SYMPTOMS
When using the SQL Server ODBC driver with an ODBC enabled application to
access SQL Server for Windows NT, an update on a table with a trigger which
calls a stored procedure, which in turn contains an unmatched COMMIT TRAN
or ROLLBACK TRAN statement, may cause an access violation to be encountered
on SQL Server, causing SQL server to terminate.
In case of Access and Visual Basic, an attempt to update the SQL server
table, will generate the following message,
ODBC - Update failed.
followed by:
[Microsoft][ODBC SQL Server Driver]Communication Link Failure.
For ODBC application writer, the following steps will encounter the
behavior:
// prepared execution to update the table
SQLPrepare: update <tablename> set <col>= ? where <col>=?
//Set parameters for the above prepared stmt
SQLSetParam:
//Begin transaction
SQLSetConnectOption:
fOption: SQL_AUTOCOMMIT
vParam : FALSE or 0
//Execute the previously prepared stmt
SQLExecute:
This will return
SQL_ERROR, with szSqlState = "08S01", *pfNativeError
= 0, *pcbErrorMsg = 61, szErrorMsg = [Microsoft][ODBC SQL Server
Driver] Communication link failure.