Using: VB5sp3, MSSQL6.5, ADO2.1, NT4.0wks
I want to execute a stored procedure performing multiple transactions
before setting a return value telling me how many transactions went
without errors.
The problem is, as soon as I get an error (for example, a duplicate
key) from one of the transactions, ADO raises a run-time error and
stops waiting for the output of the stored proc. The stored proc
continues executing alone (it is not killed), but the VB program just
never receives any more information after the error is raised.
I can catch the error with "On Error" but still, there is no way to
reconnect to the sp. I tried catching the error by setting up an
ADODB.Connection Infomessage event handler and returning
adStatusUnnwantedEvent, but the handler isn't even called before the
run-time error is raised.
Maybe I could inhibit SQL server from sending me those messages (since
I have my own server-side error logging mechanism anyway) but how?
There is no "exception trapping" frame in Transact-SQL 6.5 is there?
I really am about to kick the damn thing, there HAS to be a way of
doing this.
Any ideas?
Francis Lalonde