Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLPREPARE() command...what is it good for?
Message
De
30/03/2004 04:28:08
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00890609
Message ID:
00890687
Vues:
17

I have never used the SQLPREPARE() command before and I was wondering if anyone could tell me a bit about where and when this command would be useful. It seems from reading the help file that issuing a SQLPREPARE prior to a SQLEXEC() may make the SQLEXEC() run faster?

Is that true?

Thanks,
Don


Usefull:
Only if the SQL command is repetitive.

Normally, it is correlate with parametric commands.

Before VFP8 it was not much profit.

On VFP8, you can declare a Shared connection
( i use only shared connections because ODBC use only Statements for send commands);
then you can define multiple nStatementHandle into a connection
( VFP ODBC handle are nStatementHandle into all the revision );
then you can bind ( with SQLPREPARE(nStatementHandle,...) )
one different SQL command with every nStatementHandle,
and reexecute it ( with eventual new parameters ) with only SQLEXEC(nStatementHandle).

The speed can increase if the command is complex,
but if the command is not ambiguous,
SQL2K can jump the compilation phase and then the speed can not change.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform