General information
Category:
Coding, syntax & commands
> Remember that views opens the tables and dbcs, but the update of records
> is an SQL UPDATE type command. So the table is USEd AGAIN, and that alias,
> whatever it is, is closed after the update. I believe this USE AGAIN does
> help in preventing corruption.
I think it is not quite so easy. ;-) First, SQL UPDATE will not close the table, and the current record pointer in the table will be moved if it is used already - regardless of the alias - meaning that the table is most definitely not USEd AGAIN internally.
If I understand our resident wizards (David, Sergey et al) correctly then SQL commands will affect the underlying tables - that is, they will go 'directly to the DBF' - and they will ignore any SET FILTER, buffered changes and other things that may have been inflicted on the work area of an opened table. Of course, the moving of the record pointer will cause row-buffered changes to be flushed to the DBF if Fox picks the workarea containing the changes for executing the UPDATE.
A partial workaround is to use a similar strategy as the one I posted for SQL SELECT - use the table to be updated under a specific alias and specify that alias as the target of the SQL UPDATE.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only