Home How To Online Documentation Support Download Order

 

 

 

SACommand
SAConnection
SAException
SAField
SAParam

SAString
SADateTime
SANumeric
SAInterval

Enums and Typedefs

  

Usage

Class Members

Examples

SACommand::SACommand

SACommand();

SACommand( SAConnection *pConnection , const SAString &sCmd = SAString(), SACommandType_t eCmdType = SA_CmdUnknown );

Both of these constructors initialize a new SACommand object.

Parameters

pConnection.    A pointer to the SAConnection object to be associated with the SACommand object.

sCmd.    A SAString object represents command text string (an SQL statement or a stored procedure name). If it is NULL or an empty string, no command text is associated with the command, and you have to call setCommandText method later.

eCmdType.    Type of a command. eCmdType parameter can have one of the following values from SACommandType_t enum:

  • SA_CmdUnknown     Used by default. Library detects command type automatically.
  • SA_CmdSQLStmt    Command is an SQL statement.
  • SA_CmdSQLStmtRaw    Command is an SQL statement that mustn't be interpreted by SQLAPI++.
  • SA_CmdStoredProc    Command is a stored procedure or a function.

Remarks

You can create SACommand object associated with an existing connection, and set command text and command type in constructor (Syntax 2).

It's not necessary to set a command type explicitly. But if you still have any reason to do it, use one of the SACommandType_t constants.

If you use the constructor with no parameters, it creates a new SACommand object with no connection and no command text. To associate a connection with the command and set command text call setConnection and setCommandText methods.

Server specific notes

No specific information.

See also

setConnection, setCommandText, SACommandType_t

SAConnection, SAString

Problems and Questions

If you haven't found the answer to your questions or have some problems on using the Library, please, send e-mail to howto@sqlapi.com.