Product Documentation

FairCom Direct SQL for C and C++

Previous Topic

Next Topic

ctsqlNewCommand

Allocate a new command handle.

Declaration

pCTSQLCMD ctsqlNewCommand(pCTSQLCONN hConn)

Description

ctsqlNewCommand() allocates a new command handle.

  • hConn the connection handle.

Notes:

  • This function creates a handle off the connection to perform SQL queries. Multiple command handles can be created.

    Multiple command handles do not add to the license count; only ctsqlNewConnection() will increase the connection count.

    Multiple command handles do not act separately in transactions. Transactions are on the connection.

  • This API is thread-safe at the connection level. If you are sharing a single ctsqlConnection (including child handles like ctsqlCommands) among multiple threads, you will need to ensure that all operations on a particular connection are serialized.
  • You can switch thread context using the ISAM Thread API or any other threading API.

Return

ctsqlNewCommand() returns the pointer to a command handle, or NULL on failure.

See Also

ctsqlFreeCommand()

TOCIndex