Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disable automatic ROLLBACK
Message
From
21/10/2005 13:59:55
 
 
To
21/10/2005 13:42:33
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01060812
Message ID:
01061193
Views:
12
>>>I issue a lot of SQLEXEC() command during single backend transaction started by SQLSETPROP(this.nConnHandle,"Transactions",2)
>>>
>>>Some of those SQLEXEC() commands may fail. I need to contine with transaction in case of some types of backed errors.
>>>
>>>Unfortunately, if backend returns error as response to SQLEXEC(), VFP automatically sends ROLLBACK command to backend!
>>>This does not allow my application to continue with transaction.
>>>
>>>Any idea how to disable this automatic ROLLBACK ?
>>
>>use DB_TRANSAUTO and
>>- start the transaction with SQLEXEC(...,"BEGIN TRAN")
>>- ....
>>- end with SQLEXEC(...,"COMMIT TRAN") OR "ROLLBACK"
>
>Fabio,
>
>thank you.
>
>This seems to be excellent hack to fix this issue in VFP!
>
>Are you or anybody other using this in real VFP applications ?
>What are possible drawbacks with this usage ?

I use only this way.
It asks for some ms in more, but are you that check the hut.
Naturally you go against what the MS writes,
and you will be excommunicated :)

With MANUAL it is the client ODBC (not VFP) that
it sends the command BEGIN TRAN to the server.
Practically you have to exchange the meaning:
MANUAL is Auto (ODBC open the Transaction for you),
while Auto is MANUAL (you begin,commit and rollback the transaction )

Attention, before VFP9 a bug exists,
which sends an automatic COMMIT when the connection is closed!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform