Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASP.NET locks files
Message
De
15/05/2006 15:39:04
 
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
VB 8.0
Divers
Thread ID:
01121566
Message ID:
01122001
Vues:
19
>You need a finaly and oConnection.Close() there. So no matter good or bad it's terminated.<

Nope ... I disagree. What the DataAdapter.Fill() does in reality is leave the connection in the state it was in. So, if it was already open, it will still be open after the .Fill(). If it wasn't open, the .Fill() opens and then closes it. Therefore, you'd possibly only want to close it in an error situation.

~~Bonnie



>>Probably all you need to do is to just make sure you close your connection in your catch:
>>
>>            Catch loError As Exception
>>                oApp.cError = oApp.ErrorSetup(loError, oApp.Debug(cSQL))
>>                oConnection.Close()
>>            End Try
>>
>>
>>~~Bonnie
>
Bonnie Berent DeWitt
NET/C# MVP since 2003

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

Click here to load this message in the networking platform