@ before the connection is closed. (Thies)
}
if (connection->pServiceContext) {
- /*
- connection->error =
- OCITransCommit(connection->pServiceContext,
- connection->pError,
- (ub4)0);
- */
+ connection->error =
+ OCITransRollback(connection->pServiceContext,
+ connection->pError,
+ (ub4)0);
+
+ if (connection->error) {
+ oci_error(connection->pError, "failed to rollback outstanding transactions!", connection->error);
+ }
OCIHandleFree((dvoid *) connection->pServiceContext, (ub4) OCI_HTYPE_SVCCTX);
}