?
Solved

Closed dataset error

Posted on 2006-07-19
4
Medium Priority
?
924 Views
Last Modified: 2012-06-21
Everytime I use the SalesLogix client to connect to the database I get a "Cannot perform this operation on a closed dataset"

Any ideas on how to get the client to connect to the database.

We are using Windows 2000 server and SQL 2000

0
Comment
Question by:pbraden
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 2000 total points
ID: 17139019
Hi pbraden,

This is probably the Set NOCOUNT OFF issue. If you have a complex stored procedure which performs more than a single select, you may get more than one dataset result returned. These results contain the messages that you would normally see in query analyzer and not the data you expect to see (well one of the datasets returned does, just not necessarily the first).

There are basically two ways to resolve the issue, either from your client you need to use .NextRecordset or .NextResult or whatever equivalent method is available in your client. Or you change the stored procedure that you are calling and add "SET NOCOUNT OFF" before the code that is executed in the SP. This latter option suppresses these messages and allows the data to be returned in the first resultset.

Tim Cottee
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 17140372
Tim,

>>Or you change the stored procedure that you are calling and add "SET NOCOUNT OFF" <<
I think you mean SET NOCOUNT ON.  Otherwise we have the default and messages will be displayed.  It is after all a double-negative :)
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 17142250
acperkins, it was hot and minutes before I was leaving work. That's my excuse anyway, the thought was there.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 17143352
>>That's my excuse anyway, the thought was there.<<
Most definitely, did not mean to steal your thunder, I just wish Microsoft had called it SET COUNT OFF :)

Anthony
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

771 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