Question about UPDATE - SQL in VFP6

Author: Jon Westcot

Posted: 2010-03-04 at 02:32:11

Hi all:

Is there a way to tell if an UPDATE statement actually updates a record

when there's a WHERE clause being used?

For example:

UPDATE table1 ;

SET field1 = temp_value ;

WHERE field2 = search_value

If I execute this statement, the program continues on merrily whether or

not there was a matching record based upon the WHERE clause, which, I

suppose, is just fine. But, I'd really like to know the number of records

affected by the UPDATE statement.

Does UPDATE return a count? As in:

update_count = UPDATE table1....

That would certainly solve the issue, but I don't see this syntax being

supported in the Help file.

Any thoughts would be greatly appreciated!

Thanks!

Jon

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/09BDA55E35C24678B58BB8D6821CC042@frankenmoo

** 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.

©2010 Jon Westcot