Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error 108 upon insert
Message
De
09/03/2009 15:05:11
 
 
À
09/03/2009 14:49:54
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 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01386723
Message ID:
01386727
Vues:
61
This message has been marked as a message which has helped to the initial question of the thread.
>Hi All,
>I have a LAN-based desktop application I have implemented an audit logging class for. It creates a lot of records in an auditlog table for all changes made to the tables opened in a form when the user saves. I'm getting error 108 on the INSERT-SQL command due to collisions when several people are active at the same time. I'm aware of the table locking that happens when INSERT-SQL runs, and also that a table header lock will still happen if I substitute APPEND BLANK.
>
>I'm looking for a good strategy to handle this table locking collision my audit log class code. If I out the INSERT into a TRY-CATCH structure, what do I do in CATCH section?
>
>thanks,


Retry?

Something like:
fl_error = .t.
DO WHILE fl_error
   TRY
      * Your code goes here
   CATCH
       fl_error = .f.
  ENDTRY
ENDDO
You could use a transaction (IF you need it) and adjust code for your needs (you may want to have a 5 attempts and then just go to the next statement).
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform