Information générale
Catégorie:
Codage, syntaxe et commandes
> 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.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement