Commits the current transaction. All SQL statements since the last call of any of the following functions are committed:
OraLogon, OraCommit, OraRollback
Ora.bdh
OraCommit(in hConnection: number): boolean;
true if successful
false otherwise. In this case, you can use the OraOciError function to retrieve the Oracle OCI error code
Parameter | Description |
---|---|
hConnection | Handle to the database connection |
var hConnection : number; cCursor : cursor; dcltrans transaction TMain begin OraLogon(hConnection, "user", "password", "orclnet2"); OraOpen(cCursor, hConnection); OraParse(cCursor, sqlInsert); OraBind(cCursor, ":name", SQLT_CHR, 32, 2); OraBind(cCursor, ":age", SQLT_INT, 0, 2); OraSetString(cCursor, ":name", "Bob", 1); OraSetInt(cCursor, ":age", 25, 1); OraSetString(cCursor, ":name", "Marcy", 2); OraSetInt(cCursor, ":age", 33, 2); OraExec(cCursor); OraClose(cCursor); OraCommit(hConnection); OraLogoff(hConnection); end TMain; dclsql sqlInsert: INSERT INTO persons (name, age) VALUES (:name, :age);
OraSample.bdf