Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PROBLEMS WITH TABLEUPDATE AND TRANSACTIONS
Message
 
To
18/05/1998 15:32:53
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00100182
Message ID:
00100262
Views:
21
>Working with VisualFoxPro 5.0 I'm having trouble with this code:
>
>sqlexec( n, 'begin transaction' )
>select(1)
>tableupdate(.t.)
>select(2)
>tableupdate(.t.)
>sqlexec( n, 'commit transaction' )
>
>The problem is that seems to don't work ok the sqlserver transaction scheme because the commit rollback that works ok with one tableupdate creates rare behaviour with two or more tableupdates.
>
>Can you help me? Please?
>
>Thank you very much.
>Ricardo.

Hi Ricardo,

I have faced same problem and here is the solution.

When we connect with SQLCONNECT() we get unique connection handle. Each connection has AutoTransaction property (can be 1 or 2) which contains 1
by default. so whenever you issue TABLEUPDATE() it ends (commits) transaction on backend.

You can turn this off by issuing

SQLSETPROP(nHandle, "Transactions", 2)

See help of SQLSETPROP().

Bye
Jayesh
- Jayesh
Previous
Reply
Map
View

Click here to load this message in the networking platform