Terminates the SQL statement processing.
ODBC.bdh
OdbcCancel( in cCursor : cursor ) : boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
cCursor | Cursor associated with a database connection. |
var hEnv, hDbc : number; cCursor : cursor; dcltrans transaction TMain begin OdbcAlloc(SQL_HANDLE_ENV, hEnv); OdbcAlloc(SQL_HANDLE_DBC, hDbc, hEnv); OdbcConnect(hDbc, "DSN=database;UID=user;PWD=pass;"); OdbcOpen(cCursor, hDbc); OdbcPrepare(cCursor, sqlInsert); OdbcBind(cCursor, ":1", SQL_C_CHAR, 32); OdbcBind(cCursor, ":2", SQL_C_LONG); OdbcSetMode(cCursor, ":1", SQL_DATA_AT_EXEC); OdbcSetMode(cCursor, ":2", SQL_DATA_AT_EXEC); OdbcExecute(cCursor); OdbcParamData(cCursor); OdbcCancel(cCursor); OdbcClose(cCursor, SQL_DROP); OdbcDisconnect(hDbc); OdbcFree(hDbc); OdbcFree(hEnv); end TMain; dclsql sqlInsert: INSERT INTO persons (name, age) VALUES (?, ?);