- http://adbsql.sourceforge.net/adb.html - Manual page of ADB
- http://adbsql.sourceforge.net/adbsql.html - Manual page of ADBSQL
- http://sourceforge.net/projects/adbsql/ - Sourceforge page where the project is stored and can be downloaded.
- Writing the database as XML output and later of course the ability to read it. For this purpose, the well-known tDOM package has to be installed.
- Connecting directly to a MySQL database. For this purpose the mysqltcl package has to be installed as well.
Examples of how to use it edit
To initalise a table:proc AthletesDBKey { rec } { return [[lindex $rec 0]] } set structure { {no "Licence number" 10 p alphanum} {firstname "First name" 20 {} alphanum} {surname "Surname" 20 {} alphanum} {sex "Sex" 10 {} alpha} {birthday "Birthday" 4 {} int} {club "Club" 30 {} alphanum} {category "Category" 10 {} alphanum} } ADB::Init Athletes $structure AthletesDBKeyTo add a new record:
ADB::GetEmptyArray Athletes new_arr set new_arr(no) 12445 set new_arr(firstname) John set new_arr(surname) Doe set new_arr(birthday) "01-01-2001" ADB::Add Athletes [[array get new_arr]]To fill an array with a record:
ADB::GetArray Athletes 12445 athletearrTo parse over all records in a table:
proc ForAllAthletes { } { set atlkey [[ADB::FirstKey Athletes]] while { "$atlkey" != "" } { ADB::GetArray Athletes $atlkey athletearr # Do something with array athletearr, for instance: puts "Surname is $athletearr(surname)" set atlkey [[ADB::NextKey Athletes]] } }An example.tcl file is included that contains these and other examples.
ZB 14.07.2008 - I think, that every TCL-er interested in database applications is more familiar with SQLite - so "quick comparison" would be handy.RLH 2017-08-29 : I think it being a "pure Tcl" database option is nice. It can go where Tcl does. I also like that while it has MySQL support it could be expanded to other databases or possibly piggyback on the TDBC.