Product Documentation

FairCom Direct SQL for C and C++

Previous Topic

Next Topic

ctsqlGetParameterDirection

Get the parameter direction (IN/INOUT/OUT).

Declaration

INTEGER ctsqlGetParameterDirection(pCTSQLCMD hCmd, INTEGER index)

Description

  • hCmd - the command handle.
  • index - the parameter number. Must be a number greater or equal to zero but less than parameter count.

Stored procedure parameters can be input parameters, output parameters or input/output parameters. When calling a stored procedure, input parameters can be specified as literals. Output and input/output stored procedure parameters must be specified as SQL statement parameters otherwise the engine returns error -20127 “Bad parameter specification for the statement”.

Return Values

Value

Symbolic Constant

Explanation

0

CTDBRET_OK

Successful operation.

-1

SQL_INV_PARAM

Invalid parameter

1

SQL_IN_PARAM

IN parameter

2

SQL_IN_OUT_PARAM

IN and OUT parameter

4

SQL_OUT_PARAM

OUT parameter

5

SQL_SFN_SUBS_PARAM

Unexpected parameter

See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values.

TOCIndex