VB not recognizing RAISEERROR (SQL Server)? 
Author Message
 VB not recognizing RAISEERROR (SQL Server)?

Hello:

I have a VB COM object that calls a stored procedure that saves some
information to my database.

It works fine except I have a 'data level' error condition that I want to
check for in the stored procedure.  I have used RAISEERROR for when this
condition happens.

Tested the stored procedure from query analyzer, works great, throws error
as expected.
Tested the stored procedure from java (via JDBC), works great, throws error
as expected.

Tested it from VB (using ADO) and nothing happens.  VB does not realize
there has been a problem (i.e. does not drop into my vb error handling
code).  Am I missing something silly?

thanks,
-cjl



Sat, 29 Mar 2003 03:00:00 GMT  
 VB not recognizing RAISEERROR (SQL Server)?

I've had a similar problem with a deadlock occuring in a stored procedure.
The deadlock was not being reported via the VB error object or in the ADO
errors collection.  The "set nocount on" method worked fine - although I
believe there is still a problem with the ADO errors collection as it should
have reported the error.

Another way to fix the problem with SQL Server 7 is to change the server
properties so that the default for connections is to "set nocount on" .
You'll find this option under server properties, connection tab.


Quote:
> Hello:

> I have a VB COM object that calls a stored procedure that saves some
> information to my database.

> It works fine except I have a 'data level' error condition that I want to
> check for in the stored procedure.  I have used RAISEERROR for when this
> condition happens.

> Tested the stored procedure from query analyzer, works great, throws error
> as expected.
> Tested the stored procedure from java (via JDBC), works great, throws
error
> as expected.

> Tested it from VB (using ADO) and nothing happens.  VB does not realize
> there has been a problem (i.e. does not drop into my vb error handling
> code).  Am I missing something silly?

> thanks,
> -cjl



Mon, 31 Mar 2003 09:01:26 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. iif not recognize with SQl Server using OLE DB

2. iif not recognize with SQl Server using OLE DB

3. MS SQL raiseerror not returned to ADO error collection

4. MS SQL raiseerror not returned to ADO error collection

5. Can not find SQL Server (I'm not using SQL Server)

6. SQL-OLE doesn't recognize SQL Server version

7. IIS webitem not recognizing server script

8. IIS webitem not recognizing server script

9. New Stored Procedure Parameter (SQL Server 7) isn't recognized in CR7 Report Designer

10. Recognizing SQL Server Print Messages

11. LIKE SQL do not recognize

12. Can't get RaiseError message from SQL stored procedure

 

 
Powered by phpBB® Forum Software