OLE DB Problem
-
Howdy, I have a stored procedure in MS SQL Server 2000 which performs some inserts and then a select statement. If the inserts fail (for example violating primary key contraints) i still would like to retrieve the results of the select statement. To illustrate this: insert into table values (1) insert into table values (1) /*violates primary key*/ insert into table values (2) Select stuff from table executing this in the query manager i get an error message about the failed insert and a grid for the select statement. Using OLE DB, The Execute() method fails with DB_E_INTEGRITYVIOLATION and no result set is returned! Is there anyway to either suppress the error information generated by SQL Server so that the client is never informed of the failed insert, OR is there anyway to get OLE DB to give me the result set? I have simplified the problem a lot so it might seem like I'm trying to do something senseless. Essentially I attempt a bunch of actions and the select at the end returns a bunch of error information. :) Any assistance would be greatly appreciated! ~Alex Deem