1) Database-updates via DML in a SQLExec-statement (e.g. INSERT INTO PS_TEST_TABLE VALUES(‘value_field_1′,’value_field_2′), triggered via an online component:
Peoplebooks states that DML in a SQLExec-statement is only allowed in FieldChange, SavePreChange, Workflow and SavePostChange events.
There’s a big difference in the outcome per event though; when this statement is put in a FieldChange-event, the DML is committed instantly, and this is something you probably don’t want!
2) Database-updates via DML in a SQLExec-statement (e.g. INSERT INTO PS_TEST_TABLE VALUES(‘value_field_1′,’value_field_2′), triggered via an Application Engine:
These updates are being committed according the AppEngine’s commit-settings.
2) Database-updates via a component interface, triggered via an online component (e.g. component A triggers component interface B_CI, triggering component B):
These updates are being committed as soon as the CI save-method is being invoked from the calling component (e.g. component A).
3) Database-updates via a component interface, triggered via an Application Engine (eg. AppEngine AE_1 triggers component interface B_CI, triggering component B):
These updates are being committed according the AppEngine’s commit-settings.
An exception to this rule I just recently encountered: the GetFile-statement leads to an immediate commit, even when used in an AppEngine-context!
在PLSQL中操作record时,有必要Commit的要手动处理,有时可能会发生锁表。