Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why will TXNLEVEL() fail?
Message
De
31/05/2005 14:55:21
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Why will TXNLEVEL() fail?
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows 2000 SP4
Network:
Novell 6.x
Database:
Visual FoxPro
Divers
Thread ID:
01018788
Message ID:
01018788
Vues:
65
I have code to update multiple tables (parent/child) wrapped in a transaction. During the transaction I have code to report errors to an error log when a tableupdate fails (and which table) before I rollback the transaction.

As a precaution, I wrap the open table code with a check for transaction level (IF TXNLEVEL() > 0) to use a different open routine since my general one sets buffering which is a no/no in a transaction.

Problem: I still get an error message "cannot set buffering within a transaction" which means that TXNLEVEL() is reporting NO transaction in progress yet VFP thinks/knows there is a transaction in progress. I guess I could code to always use the alternative open table (USE errorlog IN 0) but I really hate to loose all the error checking and processing that is inherrent in the framework open table routine. So what I really want to know is why TXNLEVEL() would report "0" when in a transaction so I can code around this "problem"

Thanks for any suggestions,

Steve
Répondre
Fil
Voir

Click here to load this message in the networking platform