ODBC Tcl API and C API differences
The Tcl API is similar to the C API. One set of ODBC documentation can be used for both APIs, and existing ODBC C applications can be ported to Tcl. There are several generic differences between the C ODBC API and these Tcl extensions.
Handles in the C API are pointers to memory. Handles in Tcl are short
strings ending in a number, such as environment handle henv0
, connection handle hdbc0
, statement
handle hstmt0
, and descriptor handle hdesc0
.
Some instances in C have an object specified as input. In Tcl, specify a string value through a literal value or with a "$" preceding a variable name.
For instances in which the C argument is a pointer to an object, the corresponding Tcl argument is a variable name. In most cases the argument is an output argument.