Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best Practice - Should the Connection Handle be stored
Message
De
21/11/2005 10:37:44
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01070716
Message ID:
01070773
Vues:
21
Getting the connection is the most expensive part of the connecting to SQL Server. Unless you have a reason to keep connecting/disconnecting, store it as a property and use the same connection throughout your application.


>Hi all
>
>Whenever I do a SQL Pass-Thru using SQLEXEC() I get the connection handle at the time just before the call to SQLEXEC() with a line as below:
>
	lnConnHnd = CURSORGETPROP("ConnectHandle")
>
>My question is this can I pre-store this handle in the application object goApp as a property? ie. are there any pitfalls if it is not GetProp()ed just before the SQLEXEC() call?
>
>Please advise.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform