SQL-relay TCL module

TCL API


USING

You can use the module by loading it in your TCL script and calling SQL Relay functions.

For example:

load /usr/lib/sqlrelay/sqlrelay.so sqlrelay
set con [sqlrcon -server "adasz" -port "9000" -user "user1" -password "password"]
set cur [$con sqlrcur]
catch [$cur sendQuery "select table_name from user_tables"]
$con endSession
for {set i 0} {$i<[$cur rowCount]} {incr i} {
  puts [$cur getFieldByName $i "table_name"]
}

FUNCTIONS

If you don't need to use substitution or bind variables in your queries, use these two methods.

If you need to use substitution or bind variables, in your queries use the following methods. See the API documentation for more information about substitution and bind variables.