Help Center

CODBCStmt.BindParametermethod

Binds a buffer to a parameter marker in an SQL statement.

DatabasesmethodCODBCStmt.incdocumented

Syntax

FUNCTION BindParameter (BYVAL ParameterNumber AS SQLUSMALLINT, BYVAL InputOutputType AS SQLSMALLINT, BYVAL ValueType AS SQLSMALLINT, BYVAL ParameterType AS SQLSMALLINT, BYVAL ColumnSize AS SQLULEN, BYVAL DecimalDigits AS SQLSMALLINT, BYVAL ParameterValuePtr AS SQLPOINTER, BYVAL BufferLength AS SQLLEN, BYVAL StrLen_or_IndPtr AS ANY PTR) AS SQLRETURN

Parameters

NameDescription
ParameterNumberParameter number, ordered sequentially in increasing parameter order, starting at 1.
InputOutputTypeThe type of the parameter.
ValueTypeThe C data type of the parameter.
ParameterTypeThe SQL data type of the parameter.
ColumnSizeThe size of the column or expression of the corresponding parameter marker.
DecimalDigitsThe decimal digits of the column or expression of the corresponding parameter marker.
ParameterValuePtrA pointer to a buffer for the parameter's data.
BufferLengthLength of the ParameterValuePtr buffer in bytes.
StrLen_or_IndPtrA pointer to a buffer for the parameter's length.

Return value

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_INVALID_HANDLE, or SQL_ERROR.

Description

Binds a buffer to a parameter marker in an SQL statement.

Reference

  • Include file CODBCStmt.inc
  • Defined in AfxNova/COdbcStmt.inc:571
  • Documented in Databases/ODBC Classes/CODBCStmt Class.md
  • Topic: CODBCStmt Class