-
VB6 ADO 2.7 SQL 6.5 Error not raised if execute produces a warning first
I am running an environment as below
ADO 2.7
SQL Sever OLE DB Provider
VB 6
SQL Server 6.5 SP 5 A Update
If I run a stored procedure that contains a Print statement or gives a warning. Then any error that occurs after that is ignored. No error state is raised in VB and the Errors collection only contains the print or warning.
Can anyone tell me why?
Thanks
Chris
-
VB6 ADO 2.7 SQL 6.5 Error not raised if execute produces a warning first (reply)
I have worked it out you can either make sure you put SET NOCOUNT ON at the begining of every stored procedure or execute it in this way the error will be exposed when you get to the recordset!
Set lDBRecordset = lDBCommand.Execute(RecordsAffected:=pRowsAffected)
While Not lDBRecordset Is Nothing
Set lDBRecordset = lDBRecordset.NextRecordset(RecordsAffected:=pRowsA ffected
Wend
Thanks
Chris
------------
Chris May at 5/15/2002 11:28:26 AM
I am running an environment as below
ADO 2.7
SQL Sever OLE DB Provider
VB 6
SQL Server 6.5 SP 5 A Update
If I run a stored procedure that contains a Print statement or gives a warning. Then any error that occurs after that is ignored. No error state is raised in VB and the Errors collection only contains the print or warning.
Can anyone tell me why?
Thanks
Chris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|