Re: ADO, SQLServer2000 and errors
From: Val Mazur (group51a_at_hotmail.com)
Date: 07/28/04
- Next message: Val Mazur: "Re: Shaped Recordset and Updatebatch - VB6 & ADO & SQL Server 2000"
- Previous message: William Ryan eMVP: "Re: OracleClient.OracleDataReader dataGrid"
- In reply to: Luigi: "ADO, SQLServer2000 and errors"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 28 Jul 2004 00:06:04 -0400
Hi,
You need to set specific level of severity for the SP, to be able to see the
errors. Check next KB about it
-- Val Mazur Microsoft MVP "Luigi" <Luigi@discussions.microsoft.com> wrote in message news:87A8672D-9A56-4EDE-9342-B567C1AE3B40@microsoft.com... >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: Val Mazur: "Re: Shaped Recordset and Updatebatch - VB6 & ADO & SQL Server 2000"
- Previous message: William Ryan eMVP: "Re: OracleClient.OracleDataReader dataGrid"
- In reply to: Luigi: "ADO, SQLServer2000 and errors"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|