4D v16

ODBC_SQLBindParameter

ホーム

 
4D v16
ODBC_SQLBindParameter

ODBC_SQLBindParameter 


 

ODBC_SQLBindParameter ( stmtID ; paramNumber ; IOType ; paramType ; columnSize ; decimalDigits ; paramValPtr ; strLenOrIndPtr ) -> 戻り値 
引数   説明
stmtID  倍長整数 in Statement ID
paramNumber  倍長整数 in Parameter number, ordered sequentially in increasing parameter order, starting at 1
IOType  倍長整数 in Type of the parameter Input or Output
paramType  倍長整数 in SQL data type of the parameter
columnSize  倍長整数 in The size of the column or expression of the corresponding parameter defined
decimalDigits  倍長整数 in The decimal digits of the column or expression of the corresponding parameter defined
paramValPtr  ポインター in A pointer to a 4D variable or field
strLenOrIndPtr  ポインター in A pointer to the parameter's length if it's a Text value
戻り値  倍長整数 in Returns the result of the MS ODBC API function SQLBindParameter

説明   

The ODBC_SQLBindParameter command binds a parameter and its value in an SQL Statement.

stmtID is a valid statement ID returned by ODBC_SQLAllocStmt.

paramNumber is the parameter number in the statement defined by ODBC_SQLPrepare, ordered sequentially in increasing parameter order, starting at 1.

IOType defines whether this bind parameter is for input, output, or for input and output and can have one of the following values:

ConstantValue
SQL_PARAM_INPUT 1
SQL_PARAM_INPUT_OUTPUT 2
SQL_PARAM_OUTPUT 4

paramType is the SQL data type of the parameter and can be equal to one of the following values:

ConstantSQL Data Type
SQL_CHAR CHAR
SQL_VARCHAR VARCHAR
SQL_LONGVARCHAR LONG VARCHAR
SQL_DECIMAL DECIMAL
SQL_NUMERIC NUMERIC
SQL_SMALLINT SMALLINT
SQL_INTEGER INTEGER
SQL_REAL REAL
SQL_FLOAT FLOAT
SQL_DOUBLE DOUBLE PRECISION
SQL_BIT BIT
SQL_TINYINT TINYINT
SQL_BIGINT BIGINT
SQL_BINARY BINARY
SQL_VARBINARY VARBINARY
SQL_LONGVARBINARY LONG VARBINARY
SQL_TYPE_DATEDate
SQL_TYPE_TIME Time
SQL_TYPE_TIMESTAMP TIMESTAMP
SQL_INTERVAL_MONTH INTERVAL MONTH
SQL_INTERVAL_YEAR INTERVAL YEAR
SQL_INTERVAL_YEAR_TO_MONTH INTERVAL YEAR TO MONTH
SQL_INTERVAL_DAY INTERVAL DAY
SQL_INTERVAL_HOUR INTERVAL HOUR
SQL_INTERVAL_MINUTE INTERVAL MINUTE
SQL_INTERVAL_SECOND INTERVAL SECOND
SQL_INTERVAL_DAY_TO_HOUR INTERVAL DAY TO HOUR
SQL_INTERVAL_DAY_TO_MINUTE INTERVAL DAY TO MINUTE
SQL_INTERVAL_DAY_TO_SECOND INTERVAL DAY TO SECOND
SQL_INTERVAL_HOUR_TO_MINUTE INTERVAL HOUR TO MINUTE
SQL_INTERVAL_HOUR_TO_SECOND INTERVAL HOUR TO SECOND
SQL_INTERVAL_MINUTE_TO_SECOND INTERVAL MINUTE TO SECOND

columnSize defines the size of the column or expression of the parameter defined.

decimalDigits defines the decimal digits of the column or expression of the parameter defined.

paramValPtr is a pointer to a 4D variable or field.

strLenOrIndPtr is a pointer to a variable that defines the parameter's length if paramType is of type Text, Picture, or BLOB. Use the ODBC_LenDataAtExec command to convert the actual length so that it can be processed by the MS ODBC API.

For more information, please see the SQLBindParameter function in the MS ODBC API Reference at http://msdn.microsoft.com/en-us/library/ms710963(VS.85).aspx.

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

例題  

See the example for the ODBC_SQLExecute command.



参照 

ODBC_LenDataAtExec
ODBC_SQLPrepare

 
プロパティ 

プロダクト: 4D
テーマ: ODBC_Prepare requests
番号: 16977

 
履歴 

初出: 4D ODBC Pro 2004

 
ARTICLE USAGE

4D ODBC Pro ( 4D v16)