Parent: [111ea9] (diff)

Download this file

origins.tcl    39 lines (31 with data), 952 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env wish
# Access the "origins" table in the wines database. Not much more than
# tablescreen, just add a list window
package require sqlsc
set username ""
set hostname ""
set password ""
catch {set username $env(SQLSCUSER)}
catch {set hostname $env(SQLSCHOST)}
catch {set password $env(SQLSCPASSWORD)}
set dbname "wines"
catch {unset env(CDKITDB)}
frame .f1
button .f1.exit -text "Exit" -command "exit 0"
pack .f1.exit -side left -expand 1 -fill both
pack .f1 -side top -fill both
frame .f2
pack .f2 -side top -fill both -expand 1
set origins(database) $dbname
set origins(table) origins
set origins(sqlschost) $hostname
set origins(sqlscuser) $username
set origins(sqlscpasswd) $password
set origins(window) .f2.origins
set origins(ordercols) {origin}
set origins(autopercentboth) {origin}
set origins(allowdelete) ""
toplevel .org
set origins(list_columns) {origid origin}
set origins(list_window) .org.orglist
sqlscreen origins