Appeon Labels: of_autocommitrollback, of_autocommit, of_autorollback, and of_imdcall must be removed; they will not work in the new PowerServer.
Appeon Labels: of_startqueue, of_commitqueue, and of_update can be modified to work in the new PowerServer. Here are a few code examples.
Example 1: Directly replace of_startqueue with StartMerge, and of_commitqueue with EndMerge. If AutoCommit = False, then add the Commit and Rollback statements as well.
The code that uses Appeon Labels:
gnv_appeondb.of_startqueue() lds_1.Retrieve(ll_id) dw_1.Retireve(ll_id) SELECT next_id INTO: ll_id_max FROM TableA; UPDATE TableA SET next_id = isnull(next_id,0) + 1; gnv_appeondb.of_commitqueue()
You can modify the code as below:
gnv_PowerServerLabel.StartMerge() lds_1.Retrieve(ll_id) dw_1.Retireve(ll_id) SELECT next_id INTO: ll_id_max FROM TableA; UPDATE TableA SET next_id = isnull(next_id,0) + 1; gnv_PowerServerLabel.EndMerge() COMMIT; //if AutoCommit = False
Example 2: Modify the DataWindow/DataStore/DataWindowChild when of_update(obj_1,obj_2) is used.
The code that uses Appeon Labels:
res = gnv_appeondb.of_update(1,dw_1,dw_2) If res = 1 Then COMMIT; Else ROLLBACK; End If
You can modify the code as below:
gnv_PowerServerLabel.StartMerge(1) //StartMerge(stopmode) //stopmode: 0-continue, 1-stop; dw_1.update() dw_2.Update() gnv_PowerServerLabel.EndMerge() If gnv_PowerServerLabel.Results[1].SQLCode = 0 And gnv_PowerServerLabel.Results[2].SQLCode = 0 Then COMMIT; Else ROLLBACK; End If
Example 3: Directly make changes to the definition of of_startqueue and of_commitqueue in appeon_workarounds.pbl > appeon_nvo_db_update. For example,
Modify of_startqueue as below:
/*************************************** * Queue start label * ***************************************/ //of_startQueue(0) gnv_label.StartMerge(0)
Modify of_commitqueue as below:
/*************************************** * Queue end label * ***************************************/ gnv_label.EndMerge()