- Sivaprakash BKR
- PowerBuilder
- Saturday, 19 January 2019 11:15 AM UTC
Hello,
Using PB 2017 R3, PostgreSQL 11
Need to rollback on database disconnect command.
Updating a sequence of dw within a database transactions. If, in the middle of the update, some error erupts my application gets closed after disconnecting the database. And this disconnection seems to commit the data, instead of rollback.
This commit occurs only when there is an error in program, does not happen when database returns any error. My pseudo code is:
*********************************************
sqlca.autocommit(False)
ll_rc = dw_1.update(true, false)
If ll_rc = 1 Then
// Some settings
dw_2.SetItem(ll_row, 'field', ll_field)
dw_2.SetItem(ll_row, 'field2', ls_field)
ll_rc = dw_2.update(True, false)
End if
Sqlca.autocommit(True)
************************************************
If some typo errors in SetItem statement, system error event is called which disconnects the database and closes the application. And dw_1. data gets updated.
Is there any settings that I could avoid this database update ?
Happiness Always
BKR Sivaprakash
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.