Savepoints do not seem to work as I would expect...
OracleSession1->Savepoint("START_TRANS");
try {
tPerson->Edit();
tPerson->FieldByName("FIRSTNAME")->AsString=Edit1->Text;
tPerson->Post();
tPerson->Edit();
// the next line generates a constraint violation
tPerson->FieldByName("PERSON_ID")->AsInteger = 2;
tPerson->Post();
OracleSession1->Commit();
}
catch(Exception *E) {
OracleSession1->RollbackToSavepoint("START_TRANS");
}
Running this code I get the error "ORA-01086: savepoint 'START_TRANS' never established".
Any ideas?
John
------------------
John Pygram[/u]
JPygram@aol.com
OracleSession1->Savepoint("START_TRANS");
try {
tPerson->Edit();
tPerson->FieldByName("FIRSTNAME")->AsString=Edit1->Text;
tPerson->Post();
tPerson->Edit();
// the next line generates a constraint violation
tPerson->FieldByName("PERSON_ID")->AsInteger = 2;
tPerson->Post();
OracleSession1->Commit();
}
catch(Exception *E) {
OracleSession1->RollbackToSavepoint("START_TRANS");
}
Running this code I get the error "ORA-01086: savepoint 'START_TRANS' never established".
Any ideas?
John
------------------
John Pygram[/u]
JPygram@aol.com