Products Support Documentation Download
ODBC Statement Functions
Collaboration diagram for ODBC Statement Functions:

Functions

SQLRETURN SQLBindCol (SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLPOINTER TargetValue, SQLINTEGER BufferLength, SQLINTEGER *StrLen_or_Ind)
 Bind an application variable to the column. More...
 
SQLRETURN SQLCancel (SQLHSTMT StatementHandle)
 Cancel a statement processing. More...
 
SQLRETURN SQLCloseCursor (SQLHSTMT StatementHandle)
 Close a cursor. More...
 
SQLRETURN SQLColAttribute (SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttributePtr, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLINTEGER *NumericAttributePtr)
 Retrieve attributes of a column. More...
 
SQLRETURN SQLDescribeCol (SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLCHAR *ColumnName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLengthPtr, SQLSMALLINT *DataTypePtr, SQLUINTEGER *ColumnSizePtr, SQLSMALLINT *DecimalDigitsPtr, SQLSMALLINT *NullablePtr)
 Retrieve the detailed description of a column. More...
 
SQLRETURN SQLExecDirect (SQLHSTMT StatementHandle, const SQLCHAR *StatementText, SQLINTEGER TextLength)
 Prepare and execute an SQL statement. More...
 
SQLRETURN SQLExecute (SQLHSTMT StatementHandle)
 Execute a prepared SQL statement. More...
 
SQLRETURN SQLFetch (SQLHSTMT StatementHandle)
 Fetch the next set of rows from the result set. More...
 
SQLRETURN SQLFetchScroll (SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLINTEGER FetchOffset)
 Fetch the next set of rows from the result set. More...
 
SQLRETURN SQLFreeStmt (SQLHSTMT StatementHandle, SQLUSMALLINT Option)
 Stops a statement processing. More...
 
SQLRETURN SQLGetCursorName (SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLength)
 Obtain the name of the current open cursor. More...
 
SQLRETURN SQLGetData (SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLPOINTER TargetValue, SQLINTEGER BufferLength, SQLINTEGER *StrLen_or_Ind)
 Fetch a single next row from the result set. More...
 
SQLRETURN SQLGetStmtAttr (SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength)
 Obtain an attribute of an ODBC statement. More...
 
SQLRETURN SQLGetTypeInfo (SQLHSTMT StatementHandle, SQLSMALLINT DataType)
 Return the information about the ODBC data types. More...
 
SQLRETURN SQLNumResultCols (SQLHSTMT StatementHandle, SQLSMALLINT *ColumnCount)
 Return the number of columns in a result set. More...
 
SQLRETURN SQLParamData (SQLHSTMT StatementHandle, SQLPOINTER *Value)
 Retrieve parameter data for the statement waiting to be executed. More...
 
SQLRETURN SQLPrepare (SQLHSTMT StatementHandle, const SQLCHAR *StatementText, SQLINTEGER TextLength)
 Prepare an SQL statement. More...
 
SQLRETURN SQLPutData (SQLHSTMT StatementHandle, SQLPOINTER Data, SQLINTEGER StrLen_or_Ind)
 Send parameterised data for insert/update. More...
 
SQLRETURN SQLRowCount (SQLHSTMT StatementHandle, SQLINTEGER *RowCount)
 Return the number of rows affected by INSERT/UPDATE/DELETE. More...
 
SQLRETURN SQLSetCursorName (SQLHSTMT StatementHandle, const SQLCHAR *CursorName, SQLSMALLINT NameLength)
 Set the name of the current open cursor. More...
 
SQLRETURN SQLSetStmtAttr (SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength)
 Set an attribute of an ODBC statement. More...
 
SQLRETURN SQLStatistics (SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Unique, SQLUSMALLINT Reserved)
 Retrieve the statistics about the specified tables. More...
 
SQLRETURN SQLBindParameter (SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT InputOutputType, SQLSMALLINT ValueType, SQLSMALLINT ParameterType, SQLUINTEGER ColumnSize, SQLSMALLINT DecimalDigits, SQLPOINTER ParameterValuePtr, SQLINTEGER BufferLength, SQLINTEGER *StrLen_or_IndPtr)
 Bind an application variable to the parameter. More...
 
SQLRETURN SQLBulkOperations (SQLHSTMT StatementHandle, SQLSMALLINT Operation)
 Perform bulk update opertations. More...
 
SQLRETURN SQLDescribeParam (SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT *DataTypePtr, SQLUINTEGER *ParameterSizePtr, SQLSMALLINT *DecimalDigitsPtr, SQLSMALLINT *NullablePtr)
 Retrieve the detailed description of a parameter. More...
 
SQLRETURN SQLMoreResults (SQLHSTMT StatementHandle)
 Check whether more results are avaiable for an SQL statement. More...
 
SQLRETURN SQLNumParams (SQLHSTMT StatementHandle, SQLSMALLINT *ParameterCountPtr)
 Return the number of parameters in an SQL statement. More...
 
SQLRETURN SQLSetPos (SQLHSTMT StatementHandle, SQLUSMALLINT RowNumber, SQLUSMALLINT Operation, SQLUSMALLINT LockType)
 Set the cursor position in a result set. More...
 

Detailed Description

Function Documentation

◆ SQLBindCol()

SQLRETURN SQLBindCol ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  ColumnNumber,
SQLSMALLINT  TargetType,
SQLPOINTER  TargetValue,
SQLINTEGER  BufferLength,
SQLINTEGER StrLen_or_Ind 
)

#include <sql.h>

Bind an application variable to the column.

See http://msdn.microsoft.com/en-us/library/ms711010(v=vs.85).aspx

◆ SQLBindParameter()

SQLRETURN SQLBindParameter ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  ParameterNumber,
SQLSMALLINT  InputOutputType,
SQLSMALLINT  ValueType,
SQLSMALLINT  ParameterType,
SQLUINTEGER  ColumnSize,
SQLSMALLINT  DecimalDigits,
SQLPOINTER  ParameterValuePtr,
SQLINTEGER  BufferLength,
SQLINTEGER StrLen_or_IndPtr 
)

#include <sqlext.h>

Bind an application variable to the parameter.

See http://msdn.microsoft.com/en-us/library/ms710963(v=vs.85).aspx

◆ SQLBulkOperations()

SQLRETURN SQLBulkOperations ( SQLHSTMT  StatementHandle,
SQLSMALLINT  Operation 
)

#include <sqlext.h>

Perform bulk update opertations.

See http://msdn.microsoft.com/en-us/library/ms712471(v=vs.85).aspx

RDM 14 does not support this function. A "function not supported" error will be returned.

◆ SQLCancel()

SQLRETURN SQLCancel ( SQLHSTMT  StatementHandle)

#include <sql.h>

Cancel a statement processing.

See http://msdn.microsoft.com/en-us/library/ms714112(v=vs.85).aspx

◆ SQLCloseCursor()

SQLRETURN SQLCloseCursor ( SQLHSTMT  StatementHandle)

◆ SQLColAttribute()

SQLRETURN SQLColAttribute ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  ColumnNumber,
SQLUSMALLINT  FieldIdentifier,
SQLPOINTER  CharacterAttributePtr,
SQLSMALLINT  BufferLength,
SQLSMALLINT StringLength,
SQLINTEGER NumericAttributePtr 
)

#include <sql.h>

Retrieve attributes of a column.

See http://msdn.microsoft.com/en-us/library/ms713558(v=vs.85).aspx

◆ SQLDescribeCol()

SQLRETURN SQLDescribeCol ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  ColumnNumber,
SQLCHAR ColumnName,
SQLSMALLINT  BufferLength,
SQLSMALLINT NameLengthPtr,
SQLSMALLINT DataTypePtr,
SQLUINTEGER ColumnSizePtr,
SQLSMALLINT DecimalDigitsPtr,
SQLSMALLINT NullablePtr 
)

#include <sql.h>

Retrieve the detailed description of a column.

See http://msdn.microsoft.com/en-us/library/ms716289(v=vs.85).aspx

◆ SQLDescribeParam()

SQLRETURN SQLDescribeParam ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  ParameterNumber,
SQLSMALLINT DataTypePtr,
SQLUINTEGER ParameterSizePtr,
SQLSMALLINT DecimalDigitsPtr,
SQLSMALLINT NullablePtr 
)

#include <sqlext.h>

Retrieve the detailed description of a parameter.

See http://msdn.microsoft.com/en-us/library/ms710188(v=vs.85).aspx

◆ SQLExecDirect()

SQLRETURN SQLExecDirect ( SQLHSTMT  StatementHandle,
const SQLCHAR StatementText,
SQLINTEGER  TextLength 
)

#include <sql.h>

Prepare and execute an SQL statement.

See http://msdn.microsoft.com/en-us/library/ms713611(v=vs.85).aspx

◆ SQLExecute()

SQLRETURN SQLExecute ( SQLHSTMT  StatementHandle)

#include <sql.h>

Execute a prepared SQL statement.

See https://msdn.microsoft.com/en-us/library/ms713584(v=vs.85).aspx

◆ SQLFetch()

SQLRETURN SQLFetch ( SQLHSTMT  StatementHandle)

#include <sql.h>

Fetch the next set of rows from the result set.

See http://msdn.microsoft.com/en-us/library/ms712424(v=vs.85).aspx

◆ SQLFetchScroll()

SQLRETURN SQLFetchScroll ( SQLHSTMT  StatementHandle,
SQLSMALLINT  FetchOrientation,
SQLINTEGER  FetchOffset 
)

#include <sql.h>

Fetch the next set of rows from the result set.

See http://msdn.microsoft.com/en-us/library/ms714682(v=vs.85).aspx

◆ SQLFreeStmt()

SQLRETURN SQLFreeStmt ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  Option 
)

#include <sql.h>

Stops a statement processing.

See http://msdn.microsoft.com/en-us/library/ms709284(v=vs.85).aspx

◆ SQLGetCursorName()

SQLRETURN SQLGetCursorName ( SQLHSTMT  StatementHandle,
SQLCHAR CursorName,
SQLSMALLINT  BufferLength,
SQLSMALLINT NameLength 
)

#include <sql.h>

Obtain the name of the current open cursor.

See http://msdn.microsoft.com/en-us/library/ms716209(v=vs.85).aspx

See also
SQLSetCursorName

◆ SQLGetData()

SQLRETURN SQLGetData ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  ColumnNumber,
SQLSMALLINT  TargetType,
SQLPOINTER  TargetValue,
SQLINTEGER  BufferLength,
SQLINTEGER StrLen_or_Ind 
)

#include <sql.h>

Fetch a single next row from the result set.

See http://msdn.microsoft.com/en-us/library/ms715441(v=vs.85).aspx

◆ SQLGetStmtAttr()

SQLRETURN SQLGetStmtAttr ( SQLHSTMT  StatementHandle,
SQLINTEGER  Attribute,
SQLPOINTER  Value,
SQLINTEGER  BufferLength,
SQLINTEGER StringLength 
)

#include <sql.h>

Obtain an attribute of an ODBC statement.

See http://msdn.microsoft.com/en-us/library/ms715438(v=vs.85).aspx

See also
SQLSetStmtAttr

◆ SQLGetTypeInfo()

SQLRETURN SQLGetTypeInfo ( SQLHSTMT  StatementHandle,
SQLSMALLINT  DataType 
)

#include <sql.h>

Return the information about the ODBC data types.

See http://msdn.microsoft.com/en-us/library/ms714632(v=vs.85).aspx

◆ SQLMoreResults()

SQLRETURN SQLMoreResults ( SQLHSTMT  StatementHandle)

#include <sqlext.h>

Check whether more results are avaiable for an SQL statement.

See http://msdn.microsoft.com/en-us/library/ms714673(v=vs.85).aspx

◆ SQLNumParams()

SQLRETURN SQLNumParams ( SQLHSTMT  StatementHandle,
SQLSMALLINT ParameterCountPtr 
)

#include <sqlext.h>

Return the number of parameters in an SQL statement.

See http://msdn.microsoft.com/en-us/library/ms715409(v=vs.85).aspx

See also
SQLNumResultCols

◆ SQLNumResultCols()

SQLRETURN SQLNumResultCols ( SQLHSTMT  StatementHandle,
SQLSMALLINT ColumnCount 
)

#include <sql.h>

Return the number of columns in a result set.

See http://msdn.microsoft.com/en-us/library/ms715393(v=vs.85).aspx

See also
SQLNumParams

◆ SQLParamData()

SQLRETURN SQLParamData ( SQLHSTMT  StatementHandle,
SQLPOINTER Value 
)

#include <sql.h>

Retrieve parameter data for the statement waiting to be executed.

See http://msdn.microsoft.com/en-us/library/ms712366(v=vs.85).aspx

◆ SQLPrepare()

SQLRETURN SQLPrepare ( SQLHSTMT  StatementHandle,
const SQLCHAR StatementText,
SQLINTEGER  TextLength 
)

◆ SQLPutData()

SQLRETURN SQLPutData ( SQLHSTMT  StatementHandle,
SQLPOINTER  Data,
SQLINTEGER  StrLen_or_Ind 
)

#include <sql.h>

Send parameterised data for insert/update.

See http://msdn.microsoft.com/en-us/library/ms713824(v=vs.85).aspx

◆ SQLRowCount()

SQLRETURN SQLRowCount ( SQLHSTMT  StatementHandle,
SQLINTEGER RowCount 
)

#include <sql.h>

Return the number of rows affected by INSERT/UPDATE/DELETE.

See http://msdn.microsoft.com/en-us/library/ms711835(v=vs.85).aspx

◆ SQLSetCursorName()

SQLRETURN SQLSetCursorName ( SQLHSTMT  StatementHandle,
const SQLCHAR CursorName,
SQLSMALLINT  NameLength 
)

#include <sql.h>

Set the name of the current open cursor.

See http://msdn.microsoft.com/en-us/library/ms711707(v=vs.85).aspx

See also
SQLGetCursorName

◆ SQLSetPos()

SQLRETURN SQLSetPos ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  RowNumber,
SQLUSMALLINT  Operation,
SQLUSMALLINT  LockType 
)

#include <sqlext.h>

Set the cursor position in a result set.

See http://msdn.microsoft.com/en-us/library/ms713507(v=vs.85).aspx

RDM 14 does not support this function. A "function not supported" error will be returned.

◆ SQLSetStmtAttr()

SQLRETURN SQLSetStmtAttr ( SQLHSTMT  StatementHandle,
SQLINTEGER  Attribute,
SQLPOINTER  Value,
SQLINTEGER  StringLength 
)

#include <sql.h>

Set an attribute of an ODBC statement.

See http://msdn.microsoft.com/en-us/library/ms712631(v=vs.85).aspx

See also
SQLGetStmtAttr

◆ SQLStatistics()

SQLRETURN SQLStatistics ( SQLHSTMT  StatementHandle,
SQLCHAR CatalogName,
SQLSMALLINT  NameLength1,
SQLCHAR SchemaName,
SQLSMALLINT  NameLength2,
SQLCHAR TableName,
SQLSMALLINT  NameLength3,
SQLUSMALLINT  Unique,
SQLUSMALLINT  Reserved 
)

#include <sql.h>

Retrieve the statistics about the specified tables.

See http://msdn.microsoft.com/en-us/library/ms711022(v=vs.85).aspx