VW 7.4 and SQL Server 2000

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VW 7.4 and SQL Server 2000

Charles Adams
I need some help with VW 7.4 and database transactions; specifically SQL Server 2000 transactions.
 
I hit a rare exception in an SQL Server database that had the effect of never returning my query. That is, the thread on which the query was sent never returned. Hence, I received no database exception or anything that would tell me something had gone wrong. I am using an ODBCSession and not an ODBCThreadedSession, because I am handling the synchronicity elsewheres.
 
SQL_QUERY_TIMEOUT is defined on ODBCSession in svar: SQLStatementOptionConversionMap. This looks like something that might address the issue but I don't understand how to use/change/invoke it.
 
On my ODBCSession, I can execute:
 
    self setStatementOptionExternal: #SQL_QUERY_TIMEOUT value: 1000
 
From MSDN, SQL_QUERY_TIMEOUT is described as:
 
"The number of seconds to wait for a SQL statement to execute before canceling the query. When set to 0 (the default) there is no timeout. If the specified timeout exceeds the maximum timeout in the data source, or is smaller than the minimum timeout, the driver substitutes that value."
 
So, the unit of the integer argument to the method above is seconds. What does it mean to "cancel the query?" I have the standard exception handler on the thread doing the query. Will I get a Signal of some sort? Is this how to handle the scenario described above?
 
The SQL Server error caused its own scheduler(s) to die. It seems possible to me that would be sufficient to stop servicing timeouts and such. That would mean this approach is useless and that something has to be done on the application end of things.
 
TIA
Charles Adams   
Adventa