Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Exception handling in C++ ADO

Author  Topic 

tjstirn
Starting Member

3 Posts

Posted - 2003-12-12 : 13:24:12
Greetings,

Here is the problem:

We have a stored procedure that selects a set of candidate rows. It then attempts to lock the candidate rows via inserts into a lock table. If a row is already locked we handle the pk insert error within the stored procedure and remove the candidate from the result set. The stored procedure side works great. However, in the C++ client the command.execute method which is wrapped in a try block catches the exception normally but there is no result set returned!

For the life of me I can't figure out why ADO would eliminate the result set when the execute returns an error, it is nulling out the pointer even though the select in the stored procedure returned results.

Anyone seen this before?
   

- Advertisement -