CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting
Microsoft Gold Certified Partner โ€“ 3 Months Free and Free Setup



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.microsoft_application_blocks Tags:
Item Type: NewsGroup Date Entered: 5/24/2005 8:45:19 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 29 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
matait
Asp.Net User
Does the DAB close connections even with a datareader?5/24/2005 8:45:19 AM

0

Hi - if I were to use the data access application block from MS, can I be assured it closes connections correctly?  I've heard it does, but can't find anywhere that says it definitely does - and looking through the code, I'm not certain either.

My problem is I'm developing for MSDE - and can't afford to leave any connections open.

Thanks for any help,

Mark

blahhumbug
Asp.Net User
Re: Does the DAB close connections even with a datareader?5/24/2005 4:24:04 PM

0

The documentation included with the version I have installed, version 2, states under the category Retrieving Multiple Rows Using a SqlDataReader: (emphasis mine)

This section describes a typical situation where you use the SqlHelper ExecuteReader method to obtain a SqlDataReader object. There are various overloaded versions of the ExecuteReader method, which can be subdivided into three categories:

?    Those that accept a connection string.

?    Those that accept a SqlConnection object. With these methods, the client is in control of connection lifetime.

?    Those that accept a SqlTransaction object. These methods allow several commands to be executed within the context of a single transaction.

 ...

If you are working with DataReaders, you should control the connection. I believe I've seen parameters in some method that specify to close the connection when done, but I'm not sure...

Good luck,
Sam


2 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
Microsoft Data Access Application Block for .NET If you look at the DAB's implementation of the method that takes a connection ... The DAAB doesn't close the connection for you if it returns a reader because the ... to run in any specific order, even if one object refers to the other. ... Does opeing a Datareader on a table puts any kind of lock on the rows, ...
How to manage SQL connections : connection, read, sqlconnection Apr 28, 2006 ... Also, to use any output parameters SqlDataReader.Close() must have been called, but the connection does not have to be closed. ...
patterns & practices โ€“ Enterprise Library - Discussions dataReader.Close(); // Explicitly close the connection. if (dbCommand != null) .... Net 2.0 with EntLib 3.1. in that i am using DAB,EHAB and LAB. ...
://the.fontvir.us/b10g/ Read()); {; String data = reader["thing"].ToString();; }; //-close connection; con.Close();. using a stored procedure with one parameter ...
Passing parameter for Stored Procedure to Data Adapter/Data Set Sep 26, 2006 ... While your code creates the parameter, it does not set the Value property. .... in the Framework object browser so it must be in the DAB or in some custom libary. ..... DataReader and DB connection closing? ...
SqlHelper.ExecuteReader, Something I Dont Understand - ng.asp-net ... SqlDataReader.get_FieldCount() at System.Data.Common. ... I understand the need for ease of use, but this seems to complicate matters by not closing the connections! ... Personally, I push the connection creation to the DAB so I dont ... Re: Datareader does not work but Dataset does Oct 8, 2007 . ...
LLBLGen vs. Microsoft DAAB... Plus More - ASP.NET Forums I don't even know if this is feasible, considering i've got several ... I also use shared functions that return a dataset or datareader when passed an id. ... open a connection, fill the 4 banners, then close the connection. .... It's faster than writing the DAB with DAAB alone, because you're ...
CodeProject: Developing Next Generation Smart Clients using .NET ... Jul 29, 2005 ... It does all the activities like calling web service, ..... class which has the same signature as the previous DAB: ... ExecuteReader( spName, parameterValues ) as SqlDataReader; ... RecordsAffected; } else { //must always close the connection reader. ... Things did not change much even on VB era. ...
Smart Clients using .NET 2.0 & Web Services It does all the activities like calling web service, fetching data, updating object ..... I have created a SqlHelper class which has same signature as the previous DAB: ... public static SqlDataReader ExecuteReader( string connectionString, ... RecordsAffected; } else { //must always close the connection reader. ...
Oracle connection with WebService Jul 21, 2005 ... connection); using (IDataReader dataReader = dbCommandWrapper.ExecuteReader .... Try/Catch does nothing because the "Open()" statement just hangs. .... Click the "Ok" button until you close out all of the security properties windows. .... Need Help with DAB v1.0 ยท Conceptual delete question ...












aspnet_wp.exe hogs resources and crashes a program

secure a hyperlink querystring

how to get system information vai web

module menu and login won't appear

execute a query from textbox alternative to dropdownlist

storing the data in client using oledbdatareader

fileiopermissions

i love us dates

publish my aspx page on the internet

user registration

new user

can you use an .htaccess file to rewrite urls with asp.net?

problem logging in

server side forms, using more than 1 per page

creating namespace in asp.net

ftpwebrequest

posting to ports instead of scripts

style.cursor='hand' in firefox not working??

including standard content with user controls

page refresh

help with this please: inherits="test._test1"

form not posting

going to an internal link in a vbscript event handler

problems webclient() class

onprerender

question on a particular usage of string.split()

"adodb" in asp.net

how to show linkbutton ?

i have a stupid question!!!!!! and need your help

pass parameter in hyperlink

   
  Privacy | Contact Us
All Times Are GMT