Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
INSERT INTO cannot be parameterized?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00829582
Message ID:
00829608
Vues:
21
I'm trying to formulate a design for data classes that accept SQL statements and either execute them locally or send them through SQLEXEC to a back end data store.

I want the SQL to be as similar as possible, yet I was startled to find that while VFP handles ?parameters fine locally for SELECT, it fails for INSERT.

After fixing my table name, I found that ?Parameters DO work fine over SQLEXEC for the INSERT statement.

>Yes, you'll need parameters for SQLEXEC but what it has to do with VFP native code?
>
>>However, I want to give the same expression to SQLEXEC()... won't that need the "?"s?
>>
>>lnID = 5
>>lcDate = {^ 2003/06/01}
>>lcName = [Johny "Shortie" Smith's kid, ]+"[25 yrs old]"
>>SQLEXEC( nConnHnd, "INSERT INTO MyTable ( TableID, Name ) VALUES ( ?lnID, ?lcName, ?lcDate )" )
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform