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::setCommandText

void setCommandText( const SAString &sCmd , SACommandType_t eCmdType = SA_CmdUnknown );
throw (SAException);

Sets the command text.

Parameters

sCmd.    A SAString object represents command text string (an SQL statement or a stored procedure name).

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

Use setCommandText method to set the command text. Command text can also be set in SACommand constructor .

It's not necessary to set a command type explicitly, because it is defined automatically in terms of command text string. But if you still have any reason to do it, use one of the SACommandType_tconstants. To get command type use CommandType method.

If the command is an SQL statement and it has parameters, a set of SAParameter objects creates implicitly. 

Server specific notes

No specific information.

See also

CommandType

SAString, SAParam, SACommandType_t

Error handling

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.