Re: SQL 2000 Stored Procedure Problem
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Sun, 27 May 2007 12:53:53 +0000 (UTC)
Attached is a simple VB project that you can play with. The program creates
two procedure. Both creates a temp table and insert a row into the table.
The first procedure then selects a row from the table, while the second
raises an error. You will see that if you run with NOCOUNT OFF, that the
first recordset is closed, while the second recordset has the data and
the error respectively. Whereas if you run with NOCOUNT (the form has a
checkbox for this), you get the data and the error directly.
To note is that I use cmd.Execute rather than oRs.Open, as you cannot use
..NextRecordset in the latter case.
To keep things simple, I connect to the default instance on the local
machine, but you could change as you please.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Attachment:
adotest - Copy.zip
Description: Zip compressed data
- Follow-Ups:
- Re: SQL 2000 Stored Procedure Problem
- From: Richard
- Re: SQL 2000 Stored Procedure Problem
- References:
- SQL 2000 Stored Procedure Problem
- From: Richard
- Re: SQL 2000 Stored Procedure Problem
- From: Russell Fields
- Re: SQL 2000 Stored Procedure Problem
- From: Richard
- Re: SQL 2000 Stored Procedure Problem
- From: Erland Sommarskog
- Re: SQL 2000 Stored Procedure Problem
- From: Richard
- Re: SQL 2000 Stored Procedure Problem
- From: Russell Fields
- Re: SQL 2000 Stored Procedure Problem
- From: Richard
- Re: SQL 2000 Stored Procedure Problem
- From: Richard
- Re: SQL 2000 Stored Procedure Problem
- From: Erland Sommarskog
- Re: SQL 2000 Stored Procedure Problem
- From: Richard
- Re: SQL 2000 Stored Procedure Problem
- From: Erland Sommarskog
- SQL 2000 Stored Procedure Problem
- Prev by Date: Re: Custom Database Roles -- Insert
- Next by Date: Permission to view system tables in master database
- Previous by thread: Re: SQL 2000 Stored Procedure Problem
- Next by thread: Re: SQL 2000 Stored Procedure Problem
- Index(es):
Relevant Pages
|