Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
? in INSERT-SQL
Message
From
13/02/2006 09:59:49
 
 
To
13/02/2006 09:50:58
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01095826
Message ID:
01095834
Views:
16
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform