Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
? in INSERT-SQL
Message
De
13/02/2006 09:59:49
 
 
À
13/02/2006 09:50:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01095826
Message ID:
01095834
Vues:
18
Because VFP is smarter... :-) No, I'm just kidding. The thing is simply that VFP uses another syntax.
Insert Into Users (Id, FirstName, LastName) Values (vpId, vpFirstName, vpLastName)
lcString = [Insert Into Users (Id, FirstName, LastName) Values (vpId, vpFirstName, vpLastName)]
>Hi there
>
>The following code is meant to work with VFP tables:
>
>
>vpId = 5
>vpFirstName = "Grigore"
>vpLastName = "Dolghin"
>
>*-- This one fails in editor:
>Insert Into Users (Id, FirstName, LastName) Values (?vpId, ?vpFirstName, ?vpLastName)
>
>*-- This one fails at runtime:
>lcString = [Insert Into Users (Id, FirstName, LastName) Values (?vpId, ?vpFirstName, ?vpLastName)]
>&lcString
>
>*-- However, this one works:
>Select * From Users Where Id = ?vpId
>
>
>However, prefixing variables with ? works like a charm when I am using SQLEXEC.
>
>Anyone know why INSERT-SQL works with parameters in SQLEXEC, but it doesn't when it works with native VFP tables?
>
>Thanks.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform