ADO/ADO.NET - SqlHelper.ExecuteDataset, do I need to open and close the connection explicitly ???
Asked By Pranay Singh
20-Nov-09 02:22 PM
When I am using SqlHelper.ExecuteNonquery or SqlHelper.ExecuteDataset, do I need to open and close the connection explicitly ???
Thank you
if you are using the SqlHelper utility class
it will open and close the connection for you.
Thank you
Thanks for help !!
End Of POst
Hope this helps.
Yes, the finally block of those methods would have the "ConnectionObject".Close method call.
But, SQL Helper is quite old, and you can move to better and advanced alternatives such as Enterprise Library Data application blocks.
As a transition from the 1.1 , the SqlHelper class was was actually replaced with an abstract class - Database from which two other classes derived from it. the SqlDatabase and the OracleDatabase classes.

Frequently asked Interview Questions in ADO.Net hi friends Any one send frequently asked Important questions in C# .Net, ADO .Net, Asp .Net and Sql Server. . . . . . . . tx in Advance. . . . . . Hi, Find this. . (B)What is an How can we know a state of a thread? (A) What is use of Interlocked class ? (A) What is a monitor object? (A) What are wait handles? (A) What is ManualResetEvent and Webservices (B)What is an application domain? (B) What is .NET Remoting? (B) Which class does the remote object has to inherit? (I) what are two different types of remote Cache substitution? Chapter 6: OOPS (B) What is Object Oriented Programming? (B) What is a Class? (B) What is an Object? (A) What is the relation between Classes and Objects? (B Overriding? (I) what is the difference between delegate and events? (B) If we inherit a class do the private variables also get inherited? (B) What is the different accessibility levels defined
a single.NET DLL contain? Answer1: As many Answer2: One or more What are good ADO.NET object(s) to replace the ADO Recordset object? The differences includes In ADO, the in-memory representation of data is the recordset. In ADO.net, it is the dataset A recordset looks like a single table in ADO In contrast a dataset is a collection of one or more tables in ADO.net ADO is designed primarily for connected access ADO.net the disconnected access to the database is used In ADO you communicate with the database
What are the advantages and drawbacks of using ADO.NET? What are the advantages and drawbacks of using ADO.NET? ADO.NET is rich with plenty of features that are bound to impress even the most skeptical up with a short list of some of the more outstanding benefits to using the ADO.NET architecture and the System.Data namespace. Pros : * Performance ? there is no doubt that ADO.NET
ado.net can i know what is ado.net. explain this topic and give some links please. . . . . HI ADO.NET is the new database technology of the .NET (Dot Net) platform, and it builds on language-neutral object model that is the keystone of Microsoft's Universal Data Access strategy. ADO.NET provides data access services in the Microsoft .NET platform. You can use ADO.NET to
ADO.NET 2.0 DataSet as a Self-Contained Remoteable Object ADO.NET 2.0 DataSet as a Self-Contained Compressed Remoteable Object by Peter A. Bromberg, Ph Wilde I've done some fun work with Compressed DataSets using BinaryFormatter and a DataSetSurrogate class to "flatten out" the ADO.NET DataSet so it can be efficiently serialized in Binary format, as well as some experiments a couple of noteworthy new items that make this reliance on outside libraries and Serialization "helper" classes unnecessary: 1) The ADO.NET 2.0 DataSet now supports Binary Serialization through its