Michael, It has no effect on the update that SHOULDN'T work and this still works.
On the Update that fails - again no difference, so you CAN'T use m. to prefix the Object reference However, the following DOES work Temp="HELLO" Update curTemp ; Set Id=m.Temp ; ... So there is definitely an area of "inconsistency" with the ".", but then again, "m." doesn't really define a property - unless of course you mean "a property of memory". In which case it breaks the rules according to M$! Dave Crozier -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of MB Software Solutions Sent: 30 March 2007 13:43 To: [email protected] Subject: Re: SQL Update and Objects - DOH! 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!" [excessive quoting removed by server] _______________________________________________ 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.

