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
FYI: the next release of both of the STD frameworks will have this feature as part of the master transaction object.
Regards ... Chris
Note: I have a big release for PB2017R3 coming out soon when PB2017R3 MR01 is released from Appeon. This will be the last R3 release of the frameworks. From there, I will be moving the Integrated framework to MR01. This will have dual support for the TE & TX controls that support the RTE Control and RT DW features of PB.