Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update doesn't work without thisform
Message
 
To
29/09/2011 15:28:11
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01525200
Message ID:
01525233
Views:
64
>I do an update with set
>
>
>UPDATE MyView ;
>	SET ;
>		Field1 = nValue1, ;
>		Field2 = .nSomeValueIHave ;
>	WHERE code = nValue3
>
>this gives an error even if there is a WITH in the beginning of that procedure
>
>
>UPDATE MyView ;
>	SET ;
>		Field1 = nValue1, ;
>		Field2 = thisform.nSomeValueIHave ;
>	WHERE code = nValue3
>
>doesn't give an error
>
>
>What's wrong here?



Try this
TEXT to mSqlcommand noshow pretext 15 TEXTMERGE
UPDATE MyView
	SET
		Field1 = nValue1, 
		Field2 = <<.nSomeValueIHave>> 
	WHERE code = nValue3
ENDTEXT
&mSqlCommand
Be sure to remove all semicolons in your code. The TEXTMERGE comment will replace
<<.nSomeValueIHave>>
with the value of your form property.
HTH
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform