I have a tcl proc, called from within an Xlate, to connect to an external database and perform queries to obtain the MRN. It appears the connections are not closing cleanly, leaving connections active that aren’t really active.
In the proc, I’m issuing the following before I exit:
set err [odbc SQLFreeHandle SQL_HANDLE_STMT $hstmt]
echo “Free handle stmt: ” $err
set err [odbc SQLDisconnect $hDBConnection]
echo “Disconnect: ” $err
set err [odbc SQLFreeHandle SQL_HANDLE_DBC $hDBConnection]
echo “Free Handle DBC: ” $err
set err [odbc SQLFreeHandle SQL_HANDLE_ENV $henv]
echo “Free Handle ENV: ” $err
The echos all return
Disconnect: SQL_SUCCESS
Free Handle DBC: SQL_SUCCESS
Free Handle ENV: SQL_SUCCESS
Free handle stmt: SQL_SUCCESS
Is there another command I need to use?
Thanks.
Mike C.