Script functions reference > Script functions in alphabetical order > O > OdbcRollbackTrans

OdbcRollbackTrans
Syntax
ODBCRollbackTrans(str_dbidentifier);
str_dbidentifier
Description
Rolls back and ends a transaction that you have opened with ODBCBeginTrans.
Note:
This function cannot be run in the preprocessing phase, and must therefore be inside an if (preproc() == 0) { } block.
Returns
1
-1
Example
if (PreProc() == 0)
{
ODBCBeginTrans("TEST");
$st="UPDATE TEST.dbo.myTable SET col1 = N'1121'; ";
OdbcExecute("TEST",$st);
ODBCRollbackTrans("TEST");
}
OpenText StreamServe 5.6.2 Updated: 2018-01-26