I would like to know if it is possible to control more than 1 transaction in a Oscript module.
In the following sample code, can I commit the first update (Column_A in Table_A) and rollback the second update (Column_B in Table_B) in one Oscript module ?
<sample code>
Boolean CommitFlg
String strSQL
/* Transaction 1 */
prgCtxOfAdmin.fDbConnect.StartTrans()
strSQL = "Update A Set Column_A = 1 FROM Table_A AS A WHERE DataID = :A1"
dynResult = CAPI.Exec( prgCtxOfAdmin.fDbConnect.fConnection, strSQL,DataID )
CommitFlg = True
prgCtxOfAdmin.fDbConnect.EndTrans( CommitFlg )
/* Transaction 2 */
prgCtxOfAdmin.fDbConnect.StartTrans()
strSQL = "Update B Set Column_B = 1 FROM Table_B AS B WHERE DataID = :A1"
dynResult = CAPI.Exec( prgCtxOfAdmin.fDbConnect.fConnection, strSQL,DataID )
CommitFlg = False
prgCtxOfAdmin.fDbConnect.EndTrans( CommitFlg )