Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLConnect() Need some advice
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00770255
Message ID:
00770909
Vues:
13
>I (and every book I had read -- and even Microsoft) would disagree with keeping a connection open for the life of the application. A SQL connection is a valuable resource. Keeping it open is BIG trouble if you will be using MSDE.

That's fine, but that was not his question --

Question: "Would it be detrimental to Connect right before insert or update then immeditaly disconnect?". Just a note, this app updates SQL for another app. Most users update and read Fox tables.

IMO, yes it would be detrimental especially in a heads down data entry shop. In these instances it is not unreasonable to create the connection when a data entry form is opened or when the connection is actually first needed then disconnect when the form is destroyed or the app is closed. But, with respect to a VFP app in these situations, to create a connection, execute TABLEUPDATE(), then immediately disconnect is counter-productive.

Ultimately, the answer should be "it depends."
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform