>When I use next operator VFP6:
>
>UPDATE mytable SET name1=This.parent.Text1.value, .... when ...
>in Command1.click method I have an error
>
>Text1 alias not found.
>
>I must use Locate and Replace operators?
>Or it is more way to use Update-SQL operator?
>PS. Insert-SQL operator working with This...-construction.
>Thanks.
Sergey,
It's a known behaviour with SQL update. It gets the first reference as an 'alias'. ie:
update myTable set myField = thisform.myProperty
Would work using 'thisform' as an 'alias'. But this one doesn't :
update myTable set myField = thisform.myObj.myProperty
IOW you need alias.fieldname style.
In order to use Uppdate SQL in your sample above you'd need variables :
local lcName
lcName = This.parent.Text1.value
UPDATE mytable SET name1=lcName, .... where ...
PS: This would also work :
UPDATE mytable SET name1=eval('This.parent.Text1.value'), .... where ...
Cetin