Solved

SQL Server 2008 R2 Suppressing Stored Proc Result Sets

Posted on 2013-05-24
3
469 Views
Last Modified: 2013-05-28
I have a stored proc which returns multiple result sets.  The results are consumed by a VBA client using ADODB to cycle through the result sets using the NextRecordSet method.

Among the genuine result sets it returns from SELECT statements, there is another result set from an INSERT INTO which the ADODB code skips past, as it's not openable as a RecordSet and does not contain anything useful anyway. I have had to add another INSERT INTO, which means changing all the code that uses this to skip another useless RecordSet.

Can anyone tell me if there's a way to suppress these result sets from INSERTs and UPDATEs? I have done quite a bit of googling but can't find anything about this.

I don't particularly like the way the SP works, but changing the fundamentals is not really an option as a lot of code depends on the current output.
0
Comment
Question by:andrewssd3
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
Brian Crowe earned 500 total points
Comment Utility
do you see SET NOCOUNT ON in your stored procedure?  If not try adding that at the top.  It may be returning the rows affected value for your INSERT/UPDATE.
0
 
LVL 17

Author Comment

by:andrewssd3
Comment Utility
I will try that - I won't be back in the office until Tuesday, but I'll report back then.

Thanks
0
 
LVL 17

Author Closing Comment

by:andrewssd3
Comment Utility
Yes - that's exactly it thanks
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now