Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why will TXNLEVEL() fail?
Message
From
31/05/2005 14:55:21
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Why will TXNLEVEL() fail?
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows 2000 SP4
Network:
Novell 6.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01018788
Message ID:
01018788
Views:
64
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
Reply
Map
View

Click here to load this message in the networking platform