Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transaction updates - causing others to crash?
Message
De
24/01/2010 13:27:39
Scott Malinowski
Arizona Fox Software LLC
Arizona, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01445710
Message ID:
01445734
Vues:
58
Hi Sergey!

Yes, I know that the errors can be trapped, etc.

What I evidently don't understand is what really happens in a transaction? I thought that when you do a BEGIN TRANSACTION, all updates/inserts are cached by VFP and the records don't actually get written to the table (table header locked) until an END TRANSACTION occurs.

So, why the FIle is in use by another user...no it isn't. Not until the END TRANSACTION takes place.

Nothing ever happens to the batch process. It always writes and never returns an error. It's the other users and processes, mostly in display information mode, that get these errors. They are not even trying to update anything.

I don't get it...

Thanks for your input, Sergey.

Scott M.


>First, the error "File is in use by another user" is not fatal and can bee intercepted by an error handler and handled accordingly.
>Every time a record is inserted in a table, VFP puts a table header lock so it can update the table header (record count field). When other user tries to add a record at the same time, he will get above mentioned error. I'm not sure how Transactions affect this though. Anyway there're a few ways you can try to work around the problem
>- Do batch processing after ours when no users are in the system.
>- Slow down batch processing so users have time to access the data
>- Add error handling for the error and retry a failing statement few times
>- A combination of above
>
>>
>>Our application, written in VPP9, SP1, using Transactions for batch updates and does not use buffering at all. We use cursor adapters to avoid all the buffering issues in coding.
>>
>>Our application runs through terminal services in most cases.
>>
>>We have a process that updates time clock entries from an flat file. This process may take a while depending on how many records are being processed. The process also uses cursor adapters and updates via a transaction.
>>
>>The process itself has never failed because of update conflicts. However, other users who are just trying to access data are getting fatal errors like: File is in use by another user.
>>
>>This is confusing to me, so I am asking for anyone with experience or thoughts about this to please help!
>>
>>Thank you,
>>
>>Scott M.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform