Dave Crozier wrote:
> To All,
> I have just come up against a really strange inconsistency error in VFP9
> (may be other versions as well but I can't check).
>
> I usually scatter fields from a data record to an object using "scatter
> name..." and then use either:
> Gather name <<object>>
>
> Or 
>
> replace <<field>> with <<object.Field>>
>
> command(s) to put them back into the table.
>
> Just for once I decided top use an SQL Update command to do the equivalent
> and it raised an error which took a while to sort out and some scratching of
> the head:
>
> With <<object>>
>   Update <<table>> ;
>     Set <<Field1>>=<<.Field1>>, ;
>   ...etc
>   Where...
>   *
> Endwith
>
>
> Results in an error when using ".Field1" object reference - what was going
> on???
>
> The error I found out when looking at the VFP help file is caused by...
> " If you want to use an object property in an expression, you need to
> specify a memory variable and then use that variable in the expression."
>
> i.e you can't use object properties in the SQL update statement. 
>   

What about if you prefaced it with the "m." like 
"m.MyObject.MyProperty"   ??

-- 
Michael J. Babcock, MCP
MB Software Solutions, LLC
http://mbsoftwaresolutions.com
http://fabmate.com
"Work smarter, not harder, with MBSS custom software solutions!"



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to