This is a discussion on SQLExecute return code for stored procedure. within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> Hello, For SQL Server 2000, if the stored procedure threw an error and there was a result set available, ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, For SQL Server 2000, if the stored procedure threw an error and there was a result set available, the return code from the ODBC call SQLExecute was SQL_SUCCESS_WITH_INFO. However, with SQL Server 2005, return code is SQL_ERROR. Has anyone else encountered this problem? Is this a bug or design change? Is there a new state like SQL_ERROR_WITH_INFO? Here is the stored procedure i am using: create procedure testProc @p1 varchar(4) output as INSERT INTO tbl VALUES('CY','CY') select * from tbl select @p1 = 'one' return 55 table... create table tbl (col1 varchar(5) unique, col2 varchar(5)) insert into tbl values('CY','CY') The above stored proc, throws a primary key violation error. Thanks! |