Modules |
|
SQL API Proprietary Functions | |
Functions |
|
RDBC_EXPORT SQLRETURN | SQLAllocHandle (SQLSMALLINT HandleType, SQLHANDLE InputHandle, SQLHANDLE *OutputHandle) |
Allocates an environment, connection, statement, or descriptor handle. More... |
|
RDBC_EXPORT SQLRETURN | SQLBindCol (SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLPOINTER TargetValue, SQLINTEGER BufferLength, SQLINTEGER *StrLen_or_Ind) |
Binds application data buffers to columns in the result set. More... |
|
RDBC_EXPORT SQLRETURN | SQLBindParam (SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType, SQLSMALLINT ParameterType, SQLUINTEGER LengthPrecision, SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLINTEGER *StrLen_or_Ind) |
Binds a buffer to a parameter marker in an SQL statement. More... |
|
RDBC_EXPORT SQLRETURN | SQLCancel (SQLHSTMT StatementHandle) |
Cancels the processing on a statement. More... |
|
RDBC_EXPORT SQLRETURN | SQLCloseCursor (SQLHSTMT StatementHandle) |
Closes a cursor that has been opened on a statement and discards pending results. More... |
|
RDBC_EXPORT SQLRETURN | SQLColAttribute (SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttributePtr, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLINTEGER *NumericAttributePtr) |
Returns descriptor information for a column in a result set. More... |
|
RDBC_EXPORT SQLRETURN | SQLColumns (SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLCHAR *ColumnName, SQLSMALLINT NameLength4) |
Returns the list of column names in specified tables. More... |
|
RDBC_EXPORT SQLRETURN | SQLConnect (SQLHDBC ConnectionHandle, const SQLCHAR *ServerName, SQLSMALLINT NameLength1, const SQLCHAR *UserName, SQLSMALLINT NameLength2, const SQLCHAR *Authentication, SQLSMALLINT NameLength3) |
Establishes connections to a driver and a data source. More... |
|
RDBC_EXPORT SQLRETURN | SQLCopyDesc (SQLHDESC SourceDescHandle, SQLHDESC TargetDescHandle) |
Copies descriptor information from one descriptor handle to another. More... |
|
RDBC_EXPORT SQLRETURN | SQLDataSources (SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLCHAR *ServerName, SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1, SQLCHAR *Description, SQLSMALLINT BufferLength2, SQLSMALLINT *NameLength2) |
Returns information about a data source. More... |
|
RDBC_EXPORT SQLRETURN | SQLDescribeCol (SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLCHAR *ColumnName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLengthPtr, SQLSMALLINT *DataTypePtr, SQLUINTEGER *ColumnSizePtr, SQLSMALLINT *DecimalDigitsPtr, SQLSMALLINT *NullablePtr) |
Returns the result descriptor for one column in the result set. More... |
|
RDBC_EXPORT SQLRETURN | SQLDisconnect (SQLHDBC ConnectionHandle) |
Closes the connection associated with a specific connection handle. More... |
|
RDBC_EXPORT SQLRETURN | SQLExecDirect (SQLHSTMT StatementHandle, const SQLCHAR *StatementText, SQLINTEGER TextLength) |
Executes a preparable statement, using the current values of the parameter marker variables if any parameters exist in the statement. More... |
|
RDBC_EXPORT SQLRETURN | SQLExecute (SQLHSTMT StatementHandle) |
Executes a prepared statement, using the current values of the parameter marker variables if any parameter markers exist in the statement. More... |
|
RDBC_EXPORT SQLRETURN | SQLFetch (SQLHSTMT StatementHandle) |
Fetches the next rowset of data from the result set and returns data for all bound columns. More... |
|
RDBC_EXPORT SQLRETURN | SQLFetchScroll (SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLINTEGER FetchOffset) |
Fetches the specified rowset of data from the result set and returns data for all bound columns. More... |
|
RDBC_EXPORT SQLRETURN | SQLFreeHandle (SQLSMALLINT HandleType, SQLHANDLE Handle) |
Frees resources associated with a specific environment, connection, statement, or descriptor handle. More... |
|
RDBC_EXPORT SQLRETURN | SQLFreeStmt (SQLHSTMT StatementHandle, SQLUSMALLINT Option) |
Stops processing associated with a specific statement, closes any open cursors associated with the statement, discards pending results, or, optionally, frees all resources associated with the statement handle. More... |
|
RDBC_EXPORT SQLRETURN | SQLGetConnectAttr (SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) |
Returns the current setting of a connection attribute. More... |
|
RDBC_EXPORT SQLRETURN | SQLGetCursorName (SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLength) |
Obtain the name of the current open cursor. More... |
|
RDBC_EXPORT 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... |
|
RDBC_EXPORT SQLRETURN | SQLGetDescField (SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) |
Obtain the information about a single descriptor header/record field. More... |
|
RDBC_EXPORT SQLRETURN | SQLGetDescRec (SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLCHAR *Name, SQLSMALLINT BufferLength, SQLSMALLINT *StringLengthPtr, SQLSMALLINT *TypePtr, SQLSMALLINT *SubTypePtr, SQLINTEGER *LengthPtr, SQLSMALLINT *PrecisionPtr, SQLSMALLINT *ScalePtr, SQLSMALLINT *NullablePtr) |
Obtain the information about multiple descriptor header/record fields. More... |
|
RDBC_EXPORT SQLRETURN | SQLGetDiagField (SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfo, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) |
Obtain the information about a single diagnostic record field. More... |
|
RDBC_EXPORT SQLRETURN | SQLGetDiagRec (SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLCHAR *Sqlstate, SQLINTEGER *NativeError, SQLCHAR *MessageText, SQLSMALLINT BufferLength, SQLSMALLINT *TextLength) |
Obtain the information about multiple diagnostic record fields. More... |
|
RDBC_EXPORT SQLRETURN | SQLGetEnvAttr (SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) |
Obtain an attribute of an SQL API environment. More... |
|
RDBC_EXPORT SQLRETURN | SQLGetFunctions (SQLHDBC ConnectionHandle, SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported) |
Return whether or not a specific SQL API function is supported. More... |
|
RDBC_EXPORT SQLRETURN | SQLGetInfo (SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQLPOINTER InfoValue, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) |
Return the information about the SQL API driver and data source. More... |
|
RDBC_EXPORT SQLRETURN | SQLGetStmtAttr (SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) |
Obtain an attribute of an SQL API statement. More... |
|
RDBC_EXPORT SQLRETURN | SQLGetTypeInfo (SQLHSTMT StatementHandle, SQLSMALLINT DataType) |
Return the information about the SQL API data types. More... |
|
RDBC_EXPORT SQLRETURN | SQLNumResultCols (SQLHSTMT StatementHandle, SQLSMALLINT *ColumnCount) |
Return the number of columns in a result set. More... |
|
RDBC_EXPORT SQLRETURN | SQLParamData (SQLHSTMT StatementHandle, SQLPOINTER *Value) |
Retrieve parameter data for the statement waiting to be executed. More... |
|
RDBC_EXPORT SQLRETURN | SQLPrepare (SQLHSTMT StatementHandle, const SQLCHAR *StatementText, SQLINTEGER TextLength) |
Prepare an SQL statement. More... |
|
RDBC_EXPORT SQLRETURN | SQLPutData (SQLHSTMT StatementHandle, SQLPOINTER Data, SQLINTEGER StrLen_or_Ind) |
Send parameterised data for insert/update. More... |
|
RDBC_EXPORT SQLRETURN | SQLRowCount (SQLHSTMT StatementHandle, SQLINTEGER *RowCount) |
Return the number of rows affected by INSERT/UPDATE/DELETE. More... |
|
RDBC_EXPORT SQLRETURN | SQLSetConnectAttr (SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) |
Set an attribute of the SQL API connection. More... |
|
RDBC_EXPORT SQLRETURN | SQLSetCursorName (SQLHSTMT StatementHandle, const SQLCHAR *CursorName, SQLSMALLINT NameLength) |
Set the name of the current open cursor. More... |
|
RDBC_EXPORT SQLRETURN | SQLSetDescField (SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength) |
Set the value of a single descriptor record field. More... |
|
RDBC_EXPORT SQLRETURN | SQLSetDescRec (SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT Type, SQLSMALLINT SubType, SQLINTEGER Length, SQLSMALLINT Precision, SQLSMALLINT Scale, SQLPOINTER Data, SQLINTEGER *StringLength, SQLINTEGER *Indicator) |
Set the value of multiple descriptor record fields. More... |
|
RDBC_EXPORT SQLRETURN | SQLSetEnvAttr (SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) |
Obtain an attribute of an SQL API environment. More... |
|
RDBC_EXPORT SQLRETURN | SQLSetStmtAttr (SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) |
Set an attribute of an SQL API statement. More... |
|
RDBC_EXPORT SQLRETURN | SQLSpecialColumns (SQLHSTMT StatementHandle, SQLSMALLINT IdentifierType, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Scope, SQLUSMALLINT Nullable) |
Retrieve the information about special columns. More... |
|
RDBC_EXPORT 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... |
|
RDBC_EXPORT SQLRETURN | SQLTables (SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLCHAR *TableType, SQLSMALLINT NameLength4) |
Retrieve the list of table names for a catalog/database. More... |
|
RDBC_EXPORT SQLRETURN | SQLDriverConnect (SQLHDBC ConnectionHandle, SQLHWND WindowHandle, const SQLCHAR *InConnectionString, SQLSMALLINT StringLength1, SQLCHAR *OutConnectionString, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength2Ptr, SQLUSMALLINT DriverCompletion) |
Driver Connect. More... |
|
RDBC_EXPORT 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... |
|
RDBC_EXPORT SQLRETURN | SQLBulkOperations (SQLHSTMT StatementHandle, SQLSMALLINT Operation) |
Perform bulk update opertations. More... |
|
RDBC_EXPORT SQLRETURN | SQLColumnPrivileges (SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName, SQLSMALLINT cbTableName, SQLCHAR *szColumnName, SQLSMALLINT cbColumnName) |
Return a list of column privileges for a table. More... |
|
RDBC_EXPORT SQLRETURN | SQLDescribeParam (SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT *DataTypePtr, SQLUINTEGER *ParameterSizePtr, SQLSMALLINT *DecimalDigitsPtr, SQLSMALLINT *NullablePtr) |
Retrieve the detailed description of a parameter. More... |
|
RDBC_EXPORT SQLRETURN | SQLForeignKeys (SQLHSTMT StatementHandle, SQLCHAR *PKCatalogName, SQLSMALLINT NameLength1, SQLCHAR *PKSchemaName, SQLSMALLINT NameLength2, SQLCHAR *PKTableName, SQLSMALLINT NameLength3, SQLCHAR *FKCatalogName, SQLSMALLINT NameLength4, SQLCHAR *FKSchemaName, SQLSMALLINT NameLength5, SQLCHAR *FKTableName, SQLSMALLINT NameLength6) |
Return a list of foreign keys in a table. More... |
|
RDBC_EXPORT SQLRETURN | SQLMoreResults (SQLHSTMT StatementHandle) |
Check whether more results are avaiable for an SQL statement. More... |
|
RDBC_EXPORT SQLRETURN | SQLNativeSql (SQLHDBC ConnectionHandle, const SQLCHAR *InStatementText, SQLINTEGER TextLength1, SQLCHAR *OutStatementText, SQLINTEGER BufferLength, SQLINTEGER *TextLength2Ptr) |
Return an SQL statement as modified by the SQL API driver. More... |
|
RDBC_EXPORT SQLRETURN | SQLNumParams (SQLHSTMT StatementHandle, SQLSMALLINT *ParameterCountPtr) |
Return the number of parameters in an SQL statement. More... |
|
RDBC_EXPORT SQLRETURN | SQLPrimaryKeys (SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3) |
Return a list of primary keys in a table. More... |
|
RDBC_EXPORT SQLRETURN | SQLProcedureColumns (SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *ProcName, SQLSMALLINT NameLength3, SQLCHAR *ColumnName, SQLSMALLINT NameLength4) |
Return a list of parameters and columns for stored routines. More... |
|
RDBC_EXPORT SQLRETURN | SQLProcedures (SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *ProcName, SQLSMALLINT NameLength3) |
Return the list of stored routine names registered with the data source. More... |
|
RDBC_EXPORT SQLRETURN | SQLSetPos (SQLHSTMT StatementHandle, SQLUSMALLINT RowNumber, SQLUSMALLINT Operation, SQLUSMALLINT LockType) |
Set the cursor position in a result set. More... |
|
RDBC_EXPORT SQLRETURN | SQLTablePrivileges (SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName, SQLSMALLINT cbTableName) |
Return a list of table privileges for the data source. More... |
|
Detailed Description
All the functions here are located in RDM SQL API Library. Linker option:
-l
rdmrdbc
.
Function Documentation
SQLAllocHandle()
RDBC_EXPORT SQLRETURN SQLAllocHandle | ( | SQLSMALLINT | HandleType, |
SQLHANDLE | InputHandle, | ||
SQLHANDLE * | OutputHandle | ||
) |
#include <sql.h>
Allocates an environment, connection, statement, or descriptor handle.
HandleType | InputHandle Type | Description |
---|---|---|
SQL_HANDLE_ENV | SQL_NULL_HANDLE | The environment handle is always associated with a SQL_NULL_HANDLE type. |
SQL_HANDLE_DBC | SQL_HANDLE_ENV | The connection handle is associated with an environment handle. |
SQL_HANDLE_STMT | SQL_HANDLE_DBC | The statement handle is associated with a connection handle. |
SQL_HANDLE_DESC | SQL_HANDLE_DBC | The descriptor handle is associated with a connection handle. |
- Return values
-
SQL_SUCCESS Function completed successfully. SQL_SUCCESS_WITH_INFO Function completed successfully, with a nonfatal status information. Use the SQLGetDiagRec() function to retrieve the additional information. SQL_INVALID_HANDLE Function failed because an invalid environment, connection, statement, or descriptor handle was provided as an argument. SQL_ERROR Function failed. Use the SQLGetDiagRec() function to retrieve the error information.
- Note
- When allocating a handle other than an environment handle, if SQLAllocHandle() returns SQL_ERROR, it sets OutputHandle to
SQL_NULL_HDBC
,SQL_NULL_HSTMT
, orSQL_NULL_HDESC
, depending on the value of HandleType, unless the output argument is a null pointer. The application can then obtain additional information from the diagnostic data structure associated with the handle in the InputHandle argument.
- Parameters
-
[in] HandleType Type of handle to be allocated [in] InputHandle Allocated input handle in whose context new handle will be allocated [out] OutputHandle Pointer to buffer to contain allocated handle structure
- Examples
- odbc01Example_main.c, tfsrdbc/rdbcTfsAlloc.c, and tfsrdbc/rdbcTfsAllocDefault.c.
SQLBindCol()
RDBC_EXPORT SQLRETURN SQLBindCol | ( | SQLHSTMT | StatementHandle, |
SQLUSMALLINT | ColumnNumber, | ||
SQLSMALLINT | TargetType, | ||
SQLPOINTER | TargetValue, | ||
SQLINTEGER | BufferLength, | ||
SQLINTEGER * | StrLen_or_Ind | ||
) |
#include <sql.h>
Binds application data buffers to columns in the result set.
- Parameters
-
[in] StatementHandle Allocated statement handle
- Examples
- odbc01Example_main.c.
SQLBindParam()
RDBC_EXPORT SQLRETURN SQLBindParam | ( | SQLHSTMT | StatementHandle, |
SQLUSMALLINT | ParameterNumber, | ||
SQLSMALLINT | ValueType, | ||
SQLSMALLINT | ParameterType, | ||
SQLUINTEGER | LengthPrecision, | ||
SQLSMALLINT | ParameterScale, | ||
SQLPOINTER | ParameterValue, | ||
SQLINTEGER * | StrLen_or_Ind | ||
) |
#include <sql.h>
Binds a buffer to a parameter marker in an SQL statement.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLBindParameter()
RDBC_EXPORT 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.
SQLBulkOperations()
RDBC_EXPORT SQLRETURN SQLBulkOperations | ( | SQLHSTMT | StatementHandle, |
SQLSMALLINT | Operation | ||
) |
SQLCancel()
RDBC_EXPORT SQLRETURN SQLCancel | ( | SQLHSTMT | StatementHandle | ) |
#include <sql.h>
Cancels the processing on a statement.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLCloseCursor()
RDBC_EXPORT SQLRETURN SQLCloseCursor | ( | SQLHSTMT | StatementHandle | ) |
#include <sql.h>
Closes a cursor that has been opened on a statement and discards pending results.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLColAttribute()
RDBC_EXPORT SQLRETURN SQLColAttribute | ( | SQLHSTMT | StatementHandle, |
SQLUSMALLINT | ColumnNumber, | ||
SQLUSMALLINT | FieldIdentifier, | ||
SQLPOINTER | CharacterAttributePtr, | ||
SQLSMALLINT | BufferLength, | ||
SQLSMALLINT * | StringLength, | ||
SQLINTEGER * | NumericAttributePtr | ||
) |
#include <sql.h>
Returns descriptor information for a column in a result set.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLColumnPrivileges()
RDBC_EXPORT SQLRETURN SQLColumnPrivileges | ( | SQLHSTMT | hstmt, |
SQLCHAR * | szCatalogName, | ||
SQLSMALLINT | cbCatalogName, | ||
SQLCHAR * | szSchemaName, | ||
SQLSMALLINT | cbSchemaName, | ||
SQLCHAR * | szTableName, | ||
SQLSMALLINT | cbTableName, | ||
SQLCHAR * | szColumnName, | ||
SQLSMALLINT | cbColumnName | ||
) |
SQLColumns()
RDBC_EXPORT SQLRETURN SQLColumns | ( | SQLHSTMT | StatementHandle, |
SQLCHAR * | CatalogName, | ||
SQLSMALLINT | NameLength1, | ||
SQLCHAR * | SchemaName, | ||
SQLSMALLINT | NameLength2, | ||
SQLCHAR * | TableName, | ||
SQLSMALLINT | NameLength3, | ||
SQLCHAR * | ColumnName, | ||
SQLSMALLINT | NameLength4 | ||
) |
#include <sql.h>
Returns the list of column names in specified tables.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLConnect()
RDBC_EXPORT SQLRETURN SQLConnect | ( | SQLHDBC | ConnectionHandle, |
const SQLCHAR * | ServerName, | ||
SQLSMALLINT | NameLength1, | ||
const SQLCHAR * | UserName, | ||
SQLSMALLINT | NameLength2, | ||
const SQLCHAR * | Authentication, | ||
SQLSMALLINT | NameLength3 | ||
) |
#include <sql.h>
Establishes connections to a driver and a data source.
- Parameters
-
[in] ConnectionHandle Allocated connection handle
- Examples
- odbc01Example_main.c.
SQLCopyDesc()
RDBC_EXPORT SQLRETURN SQLCopyDesc | ( | SQLHDESC | SourceDescHandle, |
SQLHDESC | TargetDescHandle | ||
) |
#include <sql.h>
Copies descriptor information from one descriptor handle to another.
SQLDataSources()
RDBC_EXPORT SQLRETURN SQLDataSources | ( | SQLHENV | EnvironmentHandle, |
SQLUSMALLINT | Direction, | ||
SQLCHAR * | ServerName, | ||
SQLSMALLINT | BufferLength1, | ||
SQLSMALLINT * | NameLength1, | ||
SQLCHAR * | Description, | ||
SQLSMALLINT | BufferLength2, | ||
SQLSMALLINT * | NameLength2 | ||
) |
#include <sql.h>
Returns information about a data source.
- Parameters
-
[in] EnvironmentHandle Allocated environment handle
SQLDescribeCol()
RDBC_EXPORT SQLRETURN SQLDescribeCol | ( | SQLHSTMT | StatementHandle, |
SQLUSMALLINT | ColumnNumber, | ||
SQLCHAR * | ColumnName, | ||
SQLSMALLINT | BufferLength, | ||
SQLSMALLINT * | NameLengthPtr, | ||
SQLSMALLINT * | DataTypePtr, | ||
SQLUINTEGER * | ColumnSizePtr, | ||
SQLSMALLINT * | DecimalDigitsPtr, | ||
SQLSMALLINT * | NullablePtr | ||
) |
#include <sql.h>
Returns the result descriptor for one column in the result set.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLDescribeParam()
RDBC_EXPORT SQLRETURN SQLDescribeParam | ( | SQLHSTMT | StatementHandle, |
SQLUSMALLINT | ParameterNumber, | ||
SQLSMALLINT * | DataTypePtr, | ||
SQLUINTEGER * | ParameterSizePtr, | ||
SQLSMALLINT * | DecimalDigitsPtr, | ||
SQLSMALLINT * | NullablePtr | ||
) |
#include <sqlext.h>
Retrieve the detailed description of a parameter.
SQLDisconnect()
RDBC_EXPORT SQLRETURN SQLDisconnect | ( | SQLHDBC | ConnectionHandle | ) |
#include <sql.h>
Closes the connection associated with a specific connection handle.
- Examples
- odbc01Example_main.c, tfsrdbc/rdbcTfsAlloc.c, and tfsrdbc/rdbcTfsAllocDefault.c.
SQLDriverConnect()
RDBC_EXPORT SQLRETURN SQLDriverConnect | ( | SQLHDBC | ConnectionHandle, |
SQLHWND | WindowHandle, | ||
const SQLCHAR * | InConnectionString, | ||
SQLSMALLINT | StringLength1, | ||
SQLCHAR * | OutConnectionString, | ||
SQLSMALLINT | BufferLength, | ||
SQLSMALLINT * | StringLength2Ptr, | ||
SQLUSMALLINT | DriverCompletion | ||
) |
#include <sqlext.h>
Driver Connect.
- Examples
- tfsrdbc/rdbcTfsAlloc.c, and tfsrdbc/rdbcTfsAllocDefault.c.
SQLExecDirect()
RDBC_EXPORT SQLRETURN SQLExecDirect | ( | SQLHSTMT | StatementHandle, |
const SQLCHAR * | StatementText, | ||
SQLINTEGER | TextLength | ||
) |
#include <sql.h>
Executes a preparable statement, using the current values of the parameter marker variables if any parameters exist in the statement.
- Parameters
-
[in] StatementHandle Allocated statement handle
- Examples
- odbc01Example_main.c.
SQLExecute()
RDBC_EXPORT SQLRETURN SQLExecute | ( | SQLHSTMT | StatementHandle | ) |
#include <sql.h>
Executes a prepared statement, using the current values of the parameter marker variables if any parameter markers exist in the statement.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLFetch()
RDBC_EXPORT SQLRETURN SQLFetch | ( | SQLHSTMT | StatementHandle | ) |
#include <sql.h>
Fetches the next rowset of data from the result set and returns data for all bound columns.
- Parameters
-
[in] StatementHandle Allocated statement handle
- Examples
- odbc01Example_main.c.
SQLFetchScroll()
RDBC_EXPORT SQLRETURN SQLFetchScroll | ( | SQLHSTMT | StatementHandle, |
SQLSMALLINT | FetchOrientation, | ||
SQLINTEGER | FetchOffset | ||
) |
#include <sql.h>
Fetches the specified rowset of data from the result set and returns data for all bound columns.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLForeignKeys()
RDBC_EXPORT SQLRETURN SQLForeignKeys | ( | SQLHSTMT | StatementHandle, |
SQLCHAR * | PKCatalogName, | ||
SQLSMALLINT | NameLength1, | ||
SQLCHAR * | PKSchemaName, | ||
SQLSMALLINT | NameLength2, | ||
SQLCHAR * | PKTableName, | ||
SQLSMALLINT | NameLength3, | ||
SQLCHAR * | FKCatalogName, | ||
SQLSMALLINT | NameLength4, | ||
SQLCHAR * | FKSchemaName, | ||
SQLSMALLINT | NameLength5, | ||
SQLCHAR * | FKTableName, | ||
SQLSMALLINT | NameLength6 | ||
) |
#include <sqlext.h>
Return a list of foreign keys in a table.
SQLFreeHandle()
RDBC_EXPORT SQLRETURN SQLFreeHandle | ( | SQLSMALLINT | HandleType, |
SQLHANDLE | Handle | ||
) |
#include <sql.h>
Frees resources associated with a specific environment, connection, statement, or descriptor handle.
/sa SQLAllocHandle()
- Examples
- odbc01Example_main.c, tfsrdbc/rdbcTfsAlloc.c, and tfsrdbc/rdbcTfsAllocDefault.c.
SQLFreeStmt()
RDBC_EXPORT SQLRETURN SQLFreeStmt | ( | SQLHSTMT | StatementHandle, |
SQLUSMALLINT | Option | ||
) |
#include <sql.h>
Stops processing associated with a specific statement, closes any open cursors associated with the statement, discards pending results, or, optionally, frees all resources associated with the statement handle.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLGetConnectAttr()
RDBC_EXPORT SQLRETURN SQLGetConnectAttr | ( | SQLHDBC | ConnectionHandle, |
SQLINTEGER | Attribute, | ||
SQLPOINTER | Value, | ||
SQLINTEGER | BufferLength, | ||
SQLINTEGER * | StringLength | ||
) |
#include <sql.h>
Returns the current setting of a connection attribute.
- Parameters
-
[in] ConnectionHandle Allocated connection handle
SQLGetCursorName()
RDBC_EXPORT SQLRETURN SQLGetCursorName | ( | SQLHSTMT | StatementHandle, |
SQLCHAR * | CursorName, | ||
SQLSMALLINT | BufferLength, | ||
SQLSMALLINT * | NameLength | ||
) |
#include <sql.h>
Obtain the name of the current open cursor.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLGetData()
RDBC_EXPORT 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.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLGetDescField()
RDBC_EXPORT SQLRETURN SQLGetDescField | ( | SQLHDESC | DescriptorHandle, |
SQLSMALLINT | RecNumber, | ||
SQLSMALLINT | FieldIdentifier, | ||
SQLPOINTER | Value, | ||
SQLINTEGER | BufferLength, | ||
SQLINTEGER * | StringLength | ||
) |
#include <sql.h>
Obtain the information about a single descriptor header/record field.
- Parameters
-
[in] DescriptorHandle Allocated descriptor handle
SQLGetDescRec()
RDBC_EXPORT SQLRETURN SQLGetDescRec | ( | SQLHDESC | DescriptorHandle, |
SQLSMALLINT | RecNumber, | ||
SQLCHAR * | Name, | ||
SQLSMALLINT | BufferLength, | ||
SQLSMALLINT * | StringLengthPtr, | ||
SQLSMALLINT * | TypePtr, | ||
SQLSMALLINT * | SubTypePtr, | ||
SQLINTEGER * | LengthPtr, | ||
SQLSMALLINT * | PrecisionPtr, | ||
SQLSMALLINT * | ScalePtr, | ||
SQLSMALLINT * | NullablePtr | ||
) |
#include <sql.h>
Obtain the information about multiple descriptor header/record fields.
- Parameters
-
[in] DescriptorHandle Allocated descriptor handle
SQLGetDiagField()
RDBC_EXPORT SQLRETURN SQLGetDiagField | ( | SQLSMALLINT | HandleType, |
SQLHANDLE | Handle, | ||
SQLSMALLINT | RecNumber, | ||
SQLSMALLINT | DiagIdentifier, | ||
SQLPOINTER | DiagInfo, | ||
SQLSMALLINT | BufferLength, | ||
SQLSMALLINT * | StringLength | ||
) |
#include <sql.h>
Obtain the information about a single diagnostic record field.
SQLGetDiagRec()
RDBC_EXPORT SQLRETURN SQLGetDiagRec | ( | SQLSMALLINT | HandleType, |
SQLHANDLE | Handle, | ||
SQLSMALLINT | RecNumber, | ||
SQLCHAR * | Sqlstate, | ||
SQLINTEGER * | NativeError, | ||
SQLCHAR * | MessageText, | ||
SQLSMALLINT | BufferLength, | ||
SQLSMALLINT * | TextLength | ||
) |
#include <sql.h>
Obtain the information about multiple diagnostic record fields.
- Note
- Possible return values for NativeError will be RDM_RETCODE values.
- Examples
- tfsrdbc/rdbcTfsAlloc.c, and tfsrdbc/rdbcTfsAllocDefault.c.
SQLGetEnvAttr()
RDBC_EXPORT SQLRETURN SQLGetEnvAttr | ( | SQLHENV | EnvironmentHandle, |
SQLINTEGER | Attribute, | ||
SQLPOINTER | Value, | ||
SQLINTEGER | BufferLength, | ||
SQLINTEGER * | StringLength | ||
) |
#include <sql.h>
Obtain an attribute of an SQL API environment.
- Parameters
-
[in] EnvironmentHandle Allocated environment handle
SQLGetFunctions()
RDBC_EXPORT SQLRETURN SQLGetFunctions | ( | SQLHDBC | ConnectionHandle, |
SQLUSMALLINT | FunctionId, | ||
SQLUSMALLINT * | Supported | ||
) |
#include <sql.h>
Return whether or not a specific SQL API function is supported.
- Parameters
-
[in] ConnectionHandle Allocated connection handle
SQLGetInfo()
RDBC_EXPORT SQLRETURN SQLGetInfo | ( | SQLHDBC | ConnectionHandle, |
SQLUSMALLINT | InfoType, | ||
SQLPOINTER | InfoValue, | ||
SQLSMALLINT | BufferLength, | ||
SQLSMALLINT * | StringLength | ||
) |
#include <sql.h>
Return the information about the SQL API driver and data source.
- Parameters
-
[in] ConnectionHandle Allocated connection handle
SQLGetStmtAttr()
RDBC_EXPORT SQLRETURN SQLGetStmtAttr | ( | SQLHSTMT | StatementHandle, |
SQLINTEGER | Attribute, | ||
SQLPOINTER | Value, | ||
SQLINTEGER | BufferLength, | ||
SQLINTEGER * | StringLength | ||
) |
#include <sql.h>
Obtain an attribute of an SQL API statement.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLGetTypeInfo()
RDBC_EXPORT SQLRETURN SQLGetTypeInfo | ( | SQLHSTMT | StatementHandle, |
SQLSMALLINT | DataType | ||
) |
#include <sql.h>
Return the information about the SQL API data types.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLMoreResults()
RDBC_EXPORT SQLRETURN SQLMoreResults | ( | SQLHSTMT | StatementHandle | ) |
#include <sqlext.h>
Check whether more results are avaiable for an SQL statement.
SQLNativeSql()
RDBC_EXPORT SQLRETURN SQLNativeSql | ( | SQLHDBC | ConnectionHandle, |
const SQLCHAR * | InStatementText, | ||
SQLINTEGER | TextLength1, | ||
SQLCHAR * | OutStatementText, | ||
SQLINTEGER | BufferLength, | ||
SQLINTEGER * | TextLength2Ptr | ||
) |
#include <sqlext.h>
Return an SQL statement as modified by the SQL API driver.
SQLNumParams()
RDBC_EXPORT SQLRETURN SQLNumParams | ( | SQLHSTMT | StatementHandle, |
SQLSMALLINT * | ParameterCountPtr | ||
) |
#include <sqlext.h>
Return the number of parameters in an SQL statement.
SQLNumResultCols()
RDBC_EXPORT SQLRETURN SQLNumResultCols | ( | SQLHSTMT | StatementHandle, |
SQLSMALLINT * | ColumnCount | ||
) |
#include <sql.h>
Return the number of columns in a result set.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLParamData()
RDBC_EXPORT SQLRETURN SQLParamData | ( | SQLHSTMT | StatementHandle, |
SQLPOINTER * | Value | ||
) |
#include <sql.h>
Retrieve parameter data for the statement waiting to be executed.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLPrepare()
RDBC_EXPORT SQLRETURN SQLPrepare | ( | SQLHSTMT | StatementHandle, |
const SQLCHAR * | StatementText, | ||
SQLINTEGER | TextLength | ||
) |
#include <sql.h>
Prepare an SQL statement.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLPrimaryKeys()
RDBC_EXPORT SQLRETURN SQLPrimaryKeys | ( | SQLHSTMT | StatementHandle, |
SQLCHAR * | CatalogName, | ||
SQLSMALLINT | NameLength1, | ||
SQLCHAR * | SchemaName, | ||
SQLSMALLINT | NameLength2, | ||
SQLCHAR * | TableName, | ||
SQLSMALLINT | NameLength3 | ||
) |
#include <sqlext.h>
Return a list of primary keys in a table.
SQLProcedureColumns()
RDBC_EXPORT SQLRETURN SQLProcedureColumns | ( | SQLHSTMT | StatementHandle, |
SQLCHAR * | CatalogName, | ||
SQLSMALLINT | NameLength1, | ||
SQLCHAR * | SchemaName, | ||
SQLSMALLINT | NameLength2, | ||
SQLCHAR * | ProcName, | ||
SQLSMALLINT | NameLength3, | ||
SQLCHAR * | ColumnName, | ||
SQLSMALLINT | NameLength4 | ||
) |
#include <sqlext.h>
Return a list of parameters and columns for stored routines.
SQLProcedures()
RDBC_EXPORT SQLRETURN SQLProcedures | ( | SQLHSTMT | StatementHandle, |
SQLCHAR * | CatalogName, | ||
SQLSMALLINT | NameLength1, | ||
SQLCHAR * | SchemaName, | ||
SQLSMALLINT | NameLength2, | ||
SQLCHAR * | ProcName, | ||
SQLSMALLINT | NameLength3 | ||
) |
#include <sqlext.h>
Return the list of stored routine names registered with the data source.
SQLPutData()
RDBC_EXPORT SQLRETURN SQLPutData | ( | SQLHSTMT | StatementHandle, |
SQLPOINTER | Data, | ||
SQLINTEGER | StrLen_or_Ind | ||
) |
#include <sql.h>
Send parameterised data for insert/update.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLRowCount()
RDBC_EXPORT SQLRETURN SQLRowCount | ( | SQLHSTMT | StatementHandle, |
SQLINTEGER * | RowCount | ||
) |
#include <sql.h>
Return the number of rows affected by INSERT/UPDATE/DELETE.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLSetConnectAttr()
RDBC_EXPORT SQLRETURN SQLSetConnectAttr | ( | SQLHDBC | ConnectionHandle, |
SQLINTEGER | Attribute, | ||
SQLPOINTER | Value, | ||
SQLINTEGER | StringLength | ||
) |
#include <sql.h>
Set an attribute of the SQL API connection.
- Parameters
-
[in] ConnectionHandle Allocated connection handle
- Examples
- odbc01Example_main.c, tfsrdbc/rdbcTfsAlloc.c, and tfsrdbc/rdbcTfsAllocDefault.c.
SQLSetCursorName()
RDBC_EXPORT SQLRETURN SQLSetCursorName | ( | SQLHSTMT | StatementHandle, |
const SQLCHAR * | CursorName, | ||
SQLSMALLINT | NameLength | ||
) |
#include <sql.h>
Set the name of the current open cursor.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLSetDescField()
RDBC_EXPORT SQLRETURN SQLSetDescField | ( | SQLHDESC | DescriptorHandle, |
SQLSMALLINT | RecNumber, | ||
SQLSMALLINT | FieldIdentifier, | ||
SQLPOINTER | Value, | ||
SQLINTEGER | BufferLength | ||
) |
#include <sql.h>
Set the value of a single descriptor record field.
- Parameters
-
[in] DescriptorHandle Allocated descriptor handle
SQLSetDescRec()
RDBC_EXPORT SQLRETURN SQLSetDescRec | ( | SQLHDESC | DescriptorHandle, |
SQLSMALLINT | RecNumber, | ||
SQLSMALLINT | Type, | ||
SQLSMALLINT | SubType, | ||
SQLINTEGER | Length, | ||
SQLSMALLINT | Precision, | ||
SQLSMALLINT | Scale, | ||
SQLPOINTER | Data, | ||
SQLINTEGER * | StringLength, | ||
SQLINTEGER * | Indicator | ||
) |
#include <sql.h>
Set the value of multiple descriptor record fields.
- Parameters
-
[in] DescriptorHandle Allocated descriptor handle
SQLSetEnvAttr()
RDBC_EXPORT SQLRETURN SQLSetEnvAttr | ( | SQLHENV | EnvironmentHandle, |
SQLINTEGER | Attribute, | ||
SQLPOINTER | Value, | ||
SQLINTEGER | StringLength | ||
) |
#include <sql.h>
Obtain an attribute of an SQL API environment.
- Parameters
-
[in] EnvironmentHandle Allocated environment handle
- Examples
- odbc01Example_main.c.
SQLSetPos()
RDBC_EXPORT SQLRETURN SQLSetPos | ( | SQLHSTMT | StatementHandle, |
SQLUSMALLINT | RowNumber, | ||
SQLUSMALLINT | Operation, | ||
SQLUSMALLINT | LockType | ||
) |
SQLSetStmtAttr()
RDBC_EXPORT SQLRETURN SQLSetStmtAttr | ( | SQLHSTMT | StatementHandle, |
SQLINTEGER | Attribute, | ||
SQLPOINTER | Value, | ||
SQLINTEGER | StringLength | ||
) |
#include <sql.h>
Set an attribute of an SQL API statement.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLSpecialColumns()
RDBC_EXPORT SQLRETURN SQLSpecialColumns | ( | SQLHSTMT | StatementHandle, |
SQLSMALLINT | IdentifierType, | ||
SQLCHAR * | CatalogName, | ||
SQLSMALLINT | NameLength1, | ||
SQLCHAR * | SchemaName, | ||
SQLSMALLINT | NameLength2, | ||
SQLCHAR * | TableName, | ||
SQLSMALLINT | NameLength3, | ||
SQLUSMALLINT | Scope, | ||
SQLUSMALLINT | Nullable | ||
) |
#include <sql.h>
Retrieve the information about special columns.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLStatistics()
RDBC_EXPORT 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.
- Parameters
-
[in] StatementHandle Allocated statement handle
SQLTablePrivileges()
RDBC_EXPORT SQLRETURN SQLTablePrivileges | ( | SQLHSTMT | hstmt, |
SQLCHAR * | szCatalogName, | ||
SQLSMALLINT | cbCatalogName, | ||
SQLCHAR * | szSchemaName, | ||
SQLSMALLINT | cbSchemaName, | ||
SQLCHAR * | szTableName, | ||
SQLSMALLINT | cbTableName | ||
) |
SQLTables()
RDBC_EXPORT SQLRETURN SQLTables | ( | SQLHSTMT | StatementHandle, |
SQLCHAR * | CatalogName, | ||
SQLSMALLINT | NameLength1, | ||
SQLCHAR * | SchemaName, | ||
SQLSMALLINT | NameLength2, | ||
SQLCHAR * | TableName, | ||
SQLSMALLINT | NameLength3, | ||
SQLCHAR * | TableType, | ||
SQLSMALLINT | NameLength4 | ||
) |
#include <sql.h>
Retrieve the list of table names for a catalog/database.
- Parameters
-
[in] StatementHandle Allocated statement handle