Hi Terry,
Sorry, you seem to be shifting the thread in the other direction. The saving code is fine as is and it's actually my colleague's. My question was is it an expected behavior or not? In other words, once the table participating in transacton being updated using tableupdate it can not be opened until the transaction is ended. If this is by design, so be it. But if it's not the right behavior, it must be a bug.
So, could you confirm or decline the same behavior?
Thanks in advance.
>Naomi
>
>How about one "meta" xaction (of course, you CAN nest some in between):
>
>
>begin transaction
>* all the changes that happend previously
>...
>* This bit of updating
> llUpdate = tableupdate(.t.,.t.,"First Table")
> if not llUpdate
> rollback
> Else
> tablerevert all the changes done previously
> end transaction
> close the process
> endif
>
>
>HTH
>
>Terry
>
>>Hi everybody,
>>
>>I'd like to understand if the behavior we're getting with transactions is what we should expect or there is some anomality here.
>>
>>Here is the scenario:
>>
>>When doing imports we put table buffering on bunch of our tables: Trans, Patients, Names, Address, Phones, etc. We then do various processes with the tables (inserting data or modifying data). Finally when it's time to commit the changes we do
>>
>>begin transaction
>> llUpdate = tableupdate(.t.,.t.,"First Table")
>> if not llUpdate
>> rollback
>> tablerevert all the changes done previously
>> close the process
>> endif
>> ...
>>end transaction
>>
>>Now in the separate VFP session we try to open tables used in the process. Prior to executing tableupdate we can open and close the table. But once the tableupdate is issued, we're getting "File is in use" error.
>>
>>So, is it the right behavior? The changes for that table are already happened through tableupdate, though the transaction is not yet closed.
>>
>>Thanks a lot in advance and suggestions.
If it's not broken, fix it until it is.
My Blog