Solved

Closed dataset error

Posted on 2006-07-19
4
916 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 500 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

690 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