Error returns

If severe errors happen in the Tcl extension layer unrelated to ODBC, then the Tcl invocation returns TCL_ERROR. Otherwise, the Tcl invocation returns TCL_OK and sets the interpreter result to the ODBC function return code in string form. For example, SQL_SUCCESS. When the situation warrants, the Tcl application can then invoke the SQLGetDiagRec function to retrieve error information as a C application would.