Product Documentation

FairCom Direct SQL for C and C++

Previous Topic

Next Topic

ctsqlExecute

Executes a FairCom DB SQL command after preparing it.

Declaration

CTSQLRET ctsqlExecute(pCTSQLCMD hCmd, ppCTSQLCURSOR pCursor)

Description

ctsqlExecute() executes a FairCom DB SQL command after it has been prepared with ctsqlPrepare() or ctsqlPrepareBatch(). If executing a select query, ctsqlExecute() allocates a new cursor handle.

  • hCmd the command handle.
  • pCursor the cursor handle allocated by ctsqlExecute(), if the command being executed is a select query. If the command is not a select query, pCursor is set to NULL.

Return

ctsqlExecute() returns CTSQLRET_OK on success.

Symbolic Constant

Explanation

SQL_ERR_BADPARAM

Bad parameter specification for the statement.

SQL_ERR_NOTOPENED

Cursor not opened

SQL_ERR_NOTSELECT

Open for non select statement

SQL_ERR_NOMEM

Memory allocation failure.

See Also

ctsqlPrepare(), ctsqlPrepareBatch(), ctsqlExecuteDirect()

TOCIndex