Basically, I’m querying a database for a primary MRN and a merge MRN.
The first MRN passed works fine. It queries the database and returns the expected results. The next execution of the TCL proc doesn’t work. It is like the SQL process is still active. After each result we are issuing:
# free ODBC handles
set err [odbc SQLFreeHandle SQL_HANDLE_STMT $hstmt]
set err [odbc SQLDisconnect $hDBConnection]
set err [odbc SQLFreeHandle SQL_HANDLE_DBC $hDBConnection]
set err [odbc SQLFreeHandle SQL_HANDLE_ENV $henv]
What else do we need to do to free up the connection?
Thanks.