Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disconnected DataSets
Message
De
02/09/2003 12:55:05
 
 
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00825290
Message ID:
00825372
Vues:
18
Steve,

>IOW if I hand the DataAdapter a *closed* connection, after calling the DataAdapter's Fill() method, the connection will again be closed. <

Yep, that's the way it's supposed to work.

>>I've tried this, and no matter how I try to do it, the connection remains open until a) I explicitly call the Close() method of the connection object, or b) the connection object goes out of scope.<

Hmmm ... how are you determining that the connection is still open?

~~Bonnie



>In reading Kevin McNeish's (excellent) book on .NET for VFP developers, I came across an issue that I'm having trouble with.
>
>On Page 210, Kevin states the following in a comparison of DataReaders and DataSets:
>
>"DataSets are connectionless by default—an initial connection is opened, all requested data is retrieved from the data source, and then the connection is automatically closed."
>
>I've been unable to observe this behavior.
>
>I asked Kevin about this recently, and he clarified saying that the SqlDataAdapter leaves the connection in the state in which it was found. IOW if I hand the DataAdapter a *closed* connection, after calling the DataAdapter's Fill() method, the connection will again be closed.
>
>I've tried this, and no matter how I try to do it, the connection remains open until a) I explicitly call the Close() method of the connection object, or b) the connection object goes out of scope.
>
>What am I missing/misunderstanding here?
>
>Thanks.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform