Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional C#, 2nd and 3rd Editions
This is the forum to discuss the Wrox book Professional C#, 3rd Edition by Simon Robinson, Christian Nagel, Karli Watson, Jay Glynn, Morgan Skinner, Bill Evjen; ISBN: 9780764557590
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional C#, 2nd and 3rd Editions section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 5th, 2006, 12:25 PM
Registered User
Join Date: Apr 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default About Dataset

Dear Expert,

The book I bought is Chinese version, so the page in which I have problems is not matched the English version. I just can say that the page is in the Chapter 10.3 Visual Studio and Data Access (this is my interpretation from Chinese to English). In this chapter I learned how to use Dataset as a control to manipulate the data.

What is my problem? When I used this way to manipulate the data (C# and Microsoft SQL Server), I found I cannot control the object – “sqlConnection”. That means I cannot use “sqlConnection.close” to close the connection between my application and Microsoft SQL Server. I try to find the code of “sqlConnection.open”, but I did not find anything about the action of this object. In SQL Server I found once I run my application that uses this object to manipulate the data, the connection will not disconnect until the application is shut down even if I explicitly use the code – “ sqlconnection.close”. So what is the principle of this kind of objects, can I control them?

  #2 (permalink)  
Old August 21st, 2006, 07:15 PM
Authorized User
Join Date: Jul 2006
Location: DongYing, , China.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to abeen

please quote using System.Data.SqlClient;

  #3 (permalink)  
Old October 6th, 2006, 11:04 AM
Registered User
Join Date: Oct 2006
Location: Beijing, Hebei, China.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to guozai

I understand your problem.
I also don't think the solution given by the last post can solve the problem - adding "using System.Data.SqlClient" will not help closing the SQL connection.

I also don't know how to close the SQL connection before the application quits to stop it automatically.
I reviewed all my coding samples, and found out that I haven't thought about closing the SQL connection before.
I don't know how to close the connection manually in the code. Sorry

  #4 (permalink)  
Old October 18th, 2008, 07:12 PM
Registered User
Join Date: Jul 2008
Location: Karachi, Sind, Pakistan.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ali.net Send a message via Yahoo to ali.net

Isnt using the USING statement helpful in this regard?


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fill a DataSet from another DataSet kamranzafar C# 1 February 7th, 2007 11:14 AM
Fill(dataset) or dataset.load() salemkoten SQL Server 2005 1 November 2nd, 2006 11:04 PM
Converting a untyped dataset to a typed dataset daphnean Visual Studio 2005 0 July 13th, 2006 01:16 AM
Copy dataset to another dataset kapila VB.NET 2 November 13th, 2005 06:25 AM
Re: SQL Server dataset to ACCESS dataset dazzer ADO.NET 0 March 22nd, 2004 05:28 AM

All times are GMT -4. The time now is 07:50 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.