亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sqlitetablelist.mht

?? TCL的數據庫處理支撐庫及一些示例
?? MHT
?? 第 1 頁 / 共 5 頁
字號:
            }

        }

        set no_columns [llength [split $column_names " "]]
        for {set x $no_columns} {$x <=3D [llength $result]} {incr x =
[expr $no_columns + 1]} {
            set result [linsert $result $x  \n]
        }

        #.message.label configure -text "$initial_column_names"
        #.message.label2 configure -text "$column_names"

        if {$report_type =3D=3D "text" || $report_type =3D=3D "both"} {
            .result_text insert end "$column_names \n"
        }
        regsub -all {\{\n\}} $result "\n" result
        if {$report_type =3D=3D "text" || $report_type =3D=3D "both"} {
            .result_text insert end $result
        }
        set new_column_names [list "0 [join $column_names "\n0 "]"]
        regsub -all {\{} $new_column_names {} new_column_names
        regsub -all {\}} $new_column_names {} new_column_names
        if {$report_type =3D=3D "tablelist" || $report_type =3D=3D =
"both"} {
            if {$report_type =3D=3D "tablelist"} {
                .pw fraction 0 100
            } else {
                .pw fraction 50 50
            }

            tablelist::tablelist .query_results -columns =
$new_column_names \
                    -labelcommand tablelist::sortByColumn -sortcommand =
demo::compareAsSet \
                    -editendcommand applyValue -height 15 -width 120 =
-stretch all \
                    -xscrollcommand [list .hsb set] -yscrollcommand =
[list .vsb set] \
                    -stripebackground           #e0e8f0
            for {set x 0} {$x < [llength $column_names]} {incr x} {
                .query_results columnconfigure $x -maxwidth 30 -editable =
no
            }
            scrollbar .vsb -orient vertical   -command [list =
.query_results yview]
            scrollbar .hsb -orient horizontal -command [list =
.query_results xview]
            #grid .query_results -row 0 -column 0 -sticky news
            #grid .vsb -row 0 -column 1 -sticky ns
            #grid .hsb -row 1 -column 0 -sticky ew

            #grid rowconfigure    $tf 0 -weight 1
            #grid columnconfigure $tf 0 -weight 1
            pack .hsb -in $right -expand true -fill x
            pack .vsb -in $right -side left -expand true -fill y
            pack .query_results -in $right -side left
            foreach line [split $result "\n"] {
                #regsub -all {\'} $line {\\\'} line
                .query_results insert end [string map {' \'} $line]
            }
        }
    }
 }
 pack .sqlframe.go_button -side left

 menubutton .sqlframe.report_type -relief raised -indicatoron true -text =
"Result Format" -menu  .sqlframe.report_type.menu
 pack .sqlframe.report_type -side left

 menu .sqlframe.report_type.menu
 .sqlframe.report_type.menu add radiobutton -label "Text        " =
-variable report_type -value "text"  -command {.sqlframe.report_type =
configure -text "Text         "}
 .sqlframe.report_type.menu add radiobutton -label "Tablelist   " =
-variable report_type -value  "tablelist" -command =
{.sqlframe.report_type configure -text "Tablelist    "}
 .sqlframe.report_type.menu add radiobutton -label "Both        " =
-variable report_type -value "both"  -command {.sqlframe.report_type =
configure -text "Both        "}

 label .sqlframe.column_label -text "No. Columns"
 pack .sqlframe.column_label -side left
 #set no_columns 1
 entry .sqlframe.columns -width 3 -textvariable no_columns
 pack .sqlframe.columns -side left -expand true -fill both

 focus -force .sqlframe.entry

 proc applyValue {tbl row col text} {
    global  primary_key primary_key_name
    #This proc gets called whenever you edit a value in a cell that is =
editable
    #The purpose is to then update the database with the change you made =
automatically

    # get the name of this table for the UPDATE sql command by =
introspection by querying the wm for  the top level title.
    # This way you can have multiple tablists open on different tables =
and each will know what table  it updates
    # without having to set any global variables.
    set table_name [wm title [winfo parent [winfo parent $tbl]]]
    puts $table_name

    # this inserts the change into the table cell from the entry box =
after user hits return key or  moves to another cell
    # it is set up to trim or the spaces on the right unless the data in =
the box is only a space, which is the default value.
    # a box has to have something in it in order to match the tablelist =
rows to rows in the SQLite table. This is because
    # if you have nothing in a box, the tablelist widget will output a =
list with that member removed from the list and then the
    # values going into the SQLIte table when it is updated do not match =
the right entry in the tablelist with the right column
    # in the SQLite table.
    if {![string compare $text " "]} {
        $tbl cellconfigure $row,$col -text [string trimleft [string =
trimright $text]]
    } else {
        $tbl cellconfigure $row,$col -text $text
    }
    # get the name of column by querying the tablelist widget for the =
title on the button at the top of the column
    # this will be passed to the SQL command for updating the database =
down below
    set columnname [$tbl columncget $col -title]

    #puts "columnname =3D=3D $columnname"
    #set values "'"
    set changes [$tbl get $row]
    #puts "changes =3D=3D $changes"

    set key [lindex $changes $primary_key]
    #puts "key =3D=3D $key"
    #puts "primary_key_name =3D=3D $primary_key_name"
    set changes2 [lindex $changes $col]
    regsub -all {'} $changes2 {\\u0027} changes2
    regsub -all {"} $changes2 {\\u0022} changes2
    #puts "changes2 =3D=3D $changes2"

    #set changes [join $changes "','"]
    #regsub -all {\{} $changes {'} changes
    #regsub -all {\}} $changes {'} changes
    #regsub -all {@} $changes At changes

    #append values $changes
    #append values "'"

    # db eval [subst {INSERT INTO Names VALUES($values);}]
    db eval [subst {UPDATE $table_name SET $columnname =3D '$changes2' =
WHERE $primary_key_name =3D  '$key';}]
    return [string trimleft [string trimright $text]]
 }

 proc newRecord {tbl table_name} {
    global sock primary_key primary_key_name column_names
    set lastrow [expr [$tbl index end] -1]

    # this gets the highest value of the primary key, assuming that =
column is sorted in ascending  order in the tablelist.
    # that might not be a safe assumption, it might be better to get the =
key values with an SQL  command but this will do for now.
    # get the values in the last row in the table
    set lastindex [lindex [$tbl get $lastrow] $primary_key]

    # the primary_key variable has the column number of the primary key =
column.
    # this gets the value in that column in the last row and increments =
it by one.
    if {$lastindex !=3D ""} {
        set lastindex [incr lastindex 1]
    } else {
        set lastindex 1
    }

    for {set x 0} {$x < [llength $column_names]} {incr x} {
        lappend new_row_data { }
    }

    # this inserts a new row in the table with the new index in the =
primary key column
    #$tbl insert end "{ } $lastindex { } { } { } { } { } { } { } { } { } =
{ } { } { } { } { } { } { }"
    set new_row_data [lreplace $new_row_data $primary_key $primary_key =
$lastindex]
    $tbl insert end "$new_row_data"
    $tbl see end
    set new_row_data [join $new_row_data "\',\'"]
    set new_row_data "\'$new_row_data\'"
    puts $new_row_data
    #Eval_Remote $sock "db eval [subst {\{INSERT INTO Names VALUES(' =
',$lastindex,' ',' ',' ',' ','  ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' =
',' ');\}}]"
    db eval [subst {INSERT INTO $table_name VALUES($new_row_data);}]
 }

 # This is called whenever user clicks the delete selected row button =
when the cursor is focused on a  certain row
 proc deleteRecord {tbl table_name row primary_key} {

    set row_to_delete [eval $row]

    puts "table_name =3D=3D $table_name"
    puts "row to delete =3D=3D $row_to_delete"
    puts "primary_key =3D=3D $primary_key"
    # get the value in the cell representing the primary key to pass =
later to the SQL DELETE command
    set primary_key_value [eval $tbl getcells =
$row_to_delete,$primary_key]
    puts "primary_key_value =3D=3D $primary_key_value"
    # get the name of column with the primary key by querying the =
tablelist widget for the title on  the button at the top of the column
    # this will be passed to the SQL command for updating the database =
down below
    set columnname [$tbl columncget $primary_key -title]
    puts "columnname =3D=3D $columnname"

    # Make a simple dialog to give user a chance to back out before it =
is too late.
    toplevel .are_you_sure
    label .are_you_sure.label -text "Are you sure you want to delte row =
$row_to_delete ?"
    pack .are_you_sure.label
    button .are_you_sure.yes -text "Yes, I AM sure" -command "
    destroy .are_you_sure
    # delete the row from the tablelist widget - has no actual effect on =
the SQLite database
    $tbl delete $row_to_delete
    # finally, delete the row from the Sqlite database itself.
    db eval {DELETE FROM $table_name WHERE $columnname =3D =
$primary_key_value}
    set sure_variable true
    "
    pack .are_you_sure.yes
    button .are_you_sure.no -text "No, I am NOT sure" -command {
        destroy .are_you_sure
        set sure_variable false
    }
    pack .are_you_sure.no
    tkwait variable sure_variable
 }

 proc newTable {} {
    global table_names

    set newTableName ""
    toplevel .newTable
    label .newTable.label -text "Table Name"
    pack .newTable.label
    entry .newTable.entry -textvariable newTableName
    pack .newTable.entry
    button .newTable.newField -text "Add Field" -command {
        set newFieldName ""
        set newFieldType ""
        toplevel .newField
        label .newField.label -text "Field Name"
        pack .newField.label
        entry .newField.entry -textvariable newFieldName
        pack .newField.entry
        menubutton .newField.menubutton -relief raised -text {Type =
Field} -indicatoron true -menu  .newField.menubutton.menu
        menu .newField.menubutton.menu
        .newField.menubutton.menu add radiobutton -label "TEXT" =
-variable newFieldType -value "TEXT"
        .newField.menubutton.menu add radiobutton -label "numeric" =
-variable newFieldType -value  "numeric"
        .newField.menubutton.menu add radiobutton -label "BLOB" =
-variable newFieldType -value "BLOB"
        .newField.menubutton.menu add radiobutton -label "INTEGER =
PRIMARY KEY" -variable newFieldType -value "INTEGER PRIMARY KEY"
        pack .newField.menubutton
        button .newField.done -text Done -command {
            lappend new_field_list "$newFieldName $newFieldType ,"
            puts $new_field_list

            destroy .newField
        }
        pack .newField.done

    }
    pack .newTable.newField
    button .newTable.create -text "Create Table" -command {
        if {![regexp $newTableName $table_names]} {

            if {[catch {
                    regsub -all {\}} $new_field_list {} new_field_list
                    regsub -all {\{} $new_field_list {} new_field_list
                    regsub {,$} $new_field_list {} new_field_list
                    puts $new_field_list
                } err]} {
                tk_dialog .error Error "You have to have at least one =
new field for your new table." error 0 OK
                return
            }
            set command [list db eval [subst {CREATE TABLE $newTableName =
($new_field_list);}]]
            lappend table_names $newTableName
            puts $command
            eval $command
            .topframe.leftframe.list insert end $newTableName
            destroy .newTable
        } else {
            tk_dialog .error Error "You already have a table by that =
name. Please select another." error 0 OK
        }
    }

    pack .newTable.create
 }

 proc dropTable {table} {
    global table_names
    toplevel .are_you_sure
    label .are_you_sure.label -text "Are you sure you want to delte =
table $table ?"
    pack .are_you_sure.label
    button .are_you_sure.yes -text "Yes, I AM sure" -command "
    destroy .are_you_sure
    set sure_variable true
    db eval {[subst {DROP TABLE $table ;}]}
    .topframe.leftframe.list delete [.topframe.leftframe.list index =
active]
    for \{set x 0\} \{\$x < \[llength \$table_names\]\} \{incr x\} \{
    if \{\[string compare $table  \[lindex \$table_names \$x\]\] =3D=3D =
\"0\"\} \{
    set table_names \[lreplace \$table_names \$x \$x\]
    puts \"they match\"
    \}
    \}
    "
    pack .are_you_sure.yes
    button .are_you_sure.no -text "No, I am NOT sure" -command {
        destroy .are_you_sure
        set sure_variable false
    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91浏览器打开| 美女久久久精品| 国产尤物一区二区在线| 欧美三级视频在线| 自拍偷拍亚洲综合| 国产不卡在线播放| 久久亚洲一区二区三区四区| 激情亚洲综合在线| 美女在线观看视频一区二区| 色综合久久综合网97色综合 | 亚洲国产日韩综合久久精品| 色天天综合久久久久综合片| 国产精品女同互慰在线看| 国产伦精一区二区三区| 久久亚洲一区二区三区四区| 久久99精品一区二区三区| 日韩精品中文字幕在线一区| 精品无码三级在线观看视频| 精品黑人一区二区三区久久| 精品一区二区三区影院在线午夜| 日韩一区二区视频| 日本不卡123| 国产亚洲自拍一区| 91精品一区二区三区在线观看| 亚洲福利一二三区| 欧美三级资源在线| 成人一区二区三区在线观看| 国产精品无人区| 欧美日韩国产精品成人| 日韩中文字幕区一区有砖一区| 欧美二区三区91| jizzjizzjizz欧美| 日日摸夜夜添夜夜添国产精品| 欧美经典一区二区| 成人国产亚洲欧美成人综合网| 欧美日韩国产免费| 久久综合成人精品亚洲另类欧美| 日日夜夜免费精品| 在线观看欧美黄色| 国产欧美一区二区三区沐欲 | 亚洲国产中文字幕在线视频综合| 欧美日韩精品专区| 国产精品美女久久久久aⅴ | 91精品国产综合久久久久久久久久| 国内成+人亚洲+欧美+综合在线| 亚洲狠狠丁香婷婷综合久久久| 日韩你懂的在线播放| 色综合网站在线| 麻豆国产一区二区| 亚洲欧美日韩成人高清在线一区| 日韩欧美成人午夜| 91久久精品网| 激情成人综合网| 亚洲大片在线观看| 亚洲国产电影在线观看| 欧美日韩国产乱码电影| 色香色香欲天天天影视综合网| 婷婷成人综合网| 亚洲免费在线播放| 国产亚洲婷婷免费| 日韩欧美色电影| 欧美日韩高清一区| 91在线观看高清| 国产一区二区不卡老阿姨| 亚洲一区二区三区自拍| 亚洲欧美一区二区在线观看| 国产精品久久久久久户外露出| 国产精品区一区二区三区| 久久先锋影音av鲁色资源网| 欧美日韩国产bt| 欧美私人免费视频| 91国产丝袜在线播放| 99久久精品国产一区| 国内精品伊人久久久久av一坑| 亚洲香蕉伊在人在线观| 亚洲人成人一区二区在线观看| 日韩一区在线播放| 一区二区在线观看视频在线观看| 亚洲日穴在线视频| 亚洲妇女屁股眼交7| 婷婷开心久久网| 蜜桃av一区二区三区电影| 久久精品国产免费| 狠狠色综合色综合网络| 国产一区二区伦理片| 国产成人在线免费观看| gogo大胆日本视频一区| 成人av在线一区二区三区| 色噜噜狠狠色综合中国| 欧美午夜一区二区三区| 欧美日本免费一区二区三区| 日韩欧美综合在线| 国产精品网站在线观看| 韩国三级在线一区| 成人97人人超碰人人99| 在线中文字幕一区| 日韩一区二区电影在线| 国产精品久久久一本精品| 天天免费综合色| 国产大陆亚洲精品国产| 在线观看欧美日本| 中文字幕第一区二区| 中文字幕第一页久久| 亚洲综合一区在线| 久久av资源网| 成人综合激情网| 777午夜精品视频在线播放| 久久精品亚洲国产奇米99| 亚洲国产乱码最新视频| 国产精品18久久久久久vr| 欧美日韩国产美| 亚洲精品日韩一| 国产老肥熟一区二区三区| 91麻豆精品国产91久久久久| 亚洲狠狠爱一区二区三区| 日韩avvvv在线播放| 成人激情视频网站| 久久久国产一区二区三区四区小说 | 色婷婷久久99综合精品jk白丝| 日本一区二区三区久久久久久久久不 | 欧美日韩一级视频| 亚洲女与黑人做爰| 不卡电影一区二区三区| 精品国产精品网麻豆系列| 日韩电影免费在线| 欧美午夜精品免费| 五月天一区二区三区| 欧美猛男gaygay网站| 一区二区三区.www| 欧美在线小视频| 亚洲综合视频在线| 欧美日韩国产区一| 狠狠色丁香婷综合久久| 日韩欧美中文一区二区| 日韩和欧美一区二区三区| 欧美日本乱大交xxxxx| 精品一区二区三区久久| 久久婷婷成人综合色| 国产91精品露脸国语对白| 欧美激情一区二区三区全黄| 99riav久久精品riav| 亚洲女人****多毛耸耸8| 欧美猛男超大videosgay| 国产成人精品综合在线观看| 一区免费观看视频| 欧美视频你懂的| 免费观看日韩电影| 337p日本欧洲亚洲大胆色噜噜| 国产成a人亚洲精| 亚洲一二三四区不卡| 欧美一区二区三区在| 国产精品综合av一区二区国产馆| 国产精品视频一二三| 欧美精品九九99久久| 国产高清在线精品| 一级日本不卡的影视| 欧美日韩电影一区| 国产69精品久久99不卡| 亚洲欧美日韩国产一区二区三区 | 亚洲精品日韩一| 久久精品免视看| 777a∨成人精品桃花网| 成人开心网精品视频| 午夜欧美大尺度福利影院在线看| 精品国产免费一区二区三区四区| 成人看片黄a免费看在线| 理论电影国产精品| 亚洲综合图片区| 亚洲欧美一区二区三区孕妇| 国产欧美综合在线| 久久亚洲一区二区三区四区| 欧美日韩一级二级| 国产成人日日夜夜| 美女高潮久久久| 午夜激情久久久| 亚洲黄网站在线观看| 国产精品天干天干在线综合| 欧美一区二区三区性视频| 欧美日韩精品一区二区天天拍小说 | 激情五月婷婷综合网| 日本va欧美va瓶| 丝袜诱惑亚洲看片| 国产精品第13页| ...xxx性欧美| 国产精品青草综合久久久久99| 久久久五月婷婷| 国产日本亚洲高清| 国产精品久久午夜| 亚洲色图在线看| 亚洲国产综合91精品麻豆| 亚洲va国产天堂va久久en| 蜜臀av一区二区在线免费观看 | 久久久久高清精品| 亚洲精品视频一区二区| 国产在线精品一区二区夜色| 色综合天天综合| 久久伊99综合婷婷久久伊| 亚洲一区二区三区四区在线观看| 国产一区二区三区电影在线观看| 欧美综合亚洲图片综合区|