Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transactions
Message
From
07/05/2002 14:29:45
 
 
To
05/05/2002 08:48:55
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00648654
Message ID:
00653680
Views:
23
I think I understand a little better now.
The only thing I can think of is that your TXN object has a different datasession than the data object. That would explain why it works when the BEGIN TXN is in the data object.
You should be able to fix this by setting the TXN object to DEFAULT datasession (not PRIVATE).


>I know that other users cannot see other transactions. But the main question is that I cannot figure out why the transaction won't work (when the update code is not located in same object than BEGIN TXN) even txnlevel() shows >0 when debugging code step-by-step in those update object methods. And the tables are visible in all objects involved.
>
>I have thought that I could manage multi-user conflicts with transaction. If the rows that are updated are locked, so if other users try to start their update sequence with transaction, won't their update fail if the first user's transaction is still active?
>
>And when I have tested my code, it will work just so, if the tableupdates are located in same object than BEGIN TRANSACTION.
>
>But I don't want locate the updates in same object,because they should be located in specific objects (data objects). But if i move the code in thóse objects, it seems that there is a transaction (txnlevel() is more than 0) inside invoked data object method. And everything works fine until another user starts his own transaction involving same update process. Then other users get update conflict and application bails out. Although it seemed that a transaction was active, only some tables or none are updated. In case where update code where located in the same object, I can't get those update conflicts. If somebody tries to start the update process when other transaction is active, he will get an error messagebox that i programmed and his actions are rolled back.
>
>So I have two object "families": one which works but is not very good-way programmed, and other that is more what i'm looking for, but won't work correctly.
>
>If it anyway is "datasession" problem, is there a way to handle that?
>
>But maybe I'm going to wrong direction. Have you got any different ideas how to handle this kind of situations?
>
>Thanks for your help, this is difficult to explain even in my native language, so thank you for discussing this issue with me!
>
>Best regards,
Bill Morris
Previous
Reply
Map
View

Click here to load this message in the networking platform