Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Close connection or leave open
Message
De
01/09/2004 20:44:26
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00938620
Message ID:
00938621
Vues:
26
Einar,

You don't want to keep the connection open and you don't have to ... in fact, the DataAdapter.Fill() method will open the connection, Fill the DataSet and automatically close the connection (unless the connection is already open prior to executing the .Fill() method, in which case it leaves it open).

Are you running into a specific problem?

~~Bonnie


>I was under the impression that .NET wants you to work in a disconnected state i.e. connect get the data then do whatever you need to do with the data and then connect again and update the tables. But it seems that I need to keep the connection open if I want to use the Adapter.Update(), i.e. connect and get the data and then bind the dataset to my control(s) then NOT close the connection make my changes and the issue an Adapter.Update. Is this correct? I would like to close the connection after I have retreived my data and then connect again before I need to issue Adapter.Update().
>
>Any information or clarification regarding this would be great.
>
>Thanks,
>Einar
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