ADO, SQLServer2000, stored procedure and errors
From: Luigi (Luigi_at_discussions.microsoft.com)
Date: 07/27/04
- Next message: Bass Pro: "Shaped Recordset and Updatebatch - VB6 & ADO & SQL Server 2000"
- Previous message: Luigi: "ADO, SQLServer2000 and errors"
- Next in thread: William \(Bill\) Vaughn: "Re: ADO, SQLServer2000, stored procedure and errors"
- Reply: William \(Bill\) Vaughn: "Re: ADO, SQLServer2000, stored procedure and errors"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 27 Jul 2004 09:53:39 -0700
I have a stored procedure in a SQL Server 2000 database that contains the following code lines (@c is a varchar variable)
1 set @c = 'text data'
2 if (CAST(@c as int) = -1)
3 select '@c is -2'
4
5 select 'gone on after the error'
If I execute the stored procedure in Query Analyzer what happens, as I expected, is that an error is raised (with an error level of 16) and lines 3 and 5 are not executed (I can't see the result of select statements in the results pane of Query Analyzer).
If I execute the stored procedure with and ADO.Command object, what happens is that Command.Execute is executed without any error. I can't see any entry in the Connection.Errors collection too.
Is it correct ? I excpected an error reported also at client side by ADO.
I'm using ADO 2.6 SP2 and SQL Server 2000 SP3a.
Thank you very much for any help.
Luigi
- Next message: Bass Pro: "Shaped Recordset and Updatebatch - VB6 & ADO & SQL Server 2000"
- Previous message: Luigi: "ADO, SQLServer2000 and errors"
- Next in thread: William \(Bill\) Vaughn: "Re: ADO, SQLServer2000, stored procedure and errors"
- Reply: William \(Bill\) Vaughn: "Re: ADO, SQLServer2000, stored procedure and errors"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|