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:
00829599
Vues:
21
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 )" )

The parameterization should handle encoding so that string concatination can be avoided.

However, when I try it that way, it doesn't seem to work either.

>Why do you need parameters in this case? Remove "?" and it'll work.
>
>>But this doesn't work:
>>lnID = 5
>>lcName = "Name"
>>INSERT INTO MyTable ( TableID, Name ) VALUES ( ?lnID, ?lcName )
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform