Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disable automatic ROLLBACK
Message
From
21/10/2005 13:48:27
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01060812
Message ID:
01061184
Views:
18
>Hi Andrus,
>
>> Unfortunately, if backend returns error as response to SQLEXEC(), VFP automatically sends ROLLBACK command to backend!
>
>How have you determined that VFP sends a ROLLBACK command? I'm asking, because I haven't seen this behavior yet, and I too, have code that first fails, picks an alternative and completes successfully.

I turned logging ON in a PostgreSQL ODBC driver.
In this case, all sql commands and their results are written to a log file.
This log shows that after error, an extra ROLLBACK command is always sent to
to Postgres.
This ROLLBACK command is not generated by my application.

Also, when I try to read the data added in this transaction, the data does not exist. So real rollback is done in backend.

>Are you, by chance, disconnecting from the server? In this case, the following line might help:
>
>SQLSetProp( This.nHandle, "DisconnectRollback", .F. )
>
I'm testing this in a developemnt computer connected to localhost.
It is simple to create a code to reproduce this. This is always reproducible.
Andrus
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform