sql.h File Reference

Header for the Microsoft ODBC Core API. More...

#include "sqltypes.h"
Include dependency graph for sql.h:
This graph shows which files directly or indirectly include this file:

Macros

#define ODBCVER 0x0351
#define SQL_NULL_DATA (-1)
Special length/indicator values. More...
#define SQL_DATA_AT_EXEC (-2)
#define SQL_SUCCESS 0
SQL API Return Code. More...
#define SQL_SUCCESS_WITH_INFO 1
SQL API Return Code. More...
#define SQL_NO_DATA 100
SQL API Return Code. More...
#define SQL_ERROR (-1)
SQL API Return Code. More...
#define SQL_INVALID_HANDLE (-2)
SQL API Return Code. More...
#define SQL_NEED_DATA 99
SQL API Return Code. More...
#define SQL_SUCCEEDED(rc) (((rc) & (~1)) == 0)
#define SQL_NTS (-3)
#define SQL_NTSL (-3L)
#define SQL_MAX_MESSAGE_LENGTH 512
#define SQL_DATE_LEN 10
#define SQL_TIME_LEN 8 /* add P+1 if precision is nonzero */
#define SQL_TIMESTAMP_LEN 19 /* add P+1 if precision is nonzero */
#define SQL_HANDLE_ENV 1
#define SQL_HANDLE_DBC 2
#define SQL_HANDLE_STMT 3
#define SQL_HANDLE_DESC 4
#define SQL_ATTR_OUTPUT_NTS 10001
#define SQL_ATTR_AUTO_IPD 10001
#define SQL_ATTR_METADATA_ID 10014
#define SQL_ATTR_APP_ROW_DESC 10010
#define SQL_ATTR_APP_PARAM_DESC 10011
#define SQL_ATTR_IMP_ROW_DESC 10012
#define SQL_ATTR_IMP_PARAM_DESC 10013
#define SQL_ATTR_CURSOR_SCROLLABLE (-1)
#define SQL_ATTR_CURSOR_SENSITIVITY (-2)
#define SQL_NONSCROLLABLE 0
#define SQL_SCROLLABLE 1
#define SQL_DESC_COUNT 1001
#define SQL_DESC_TYPE 1002
#define SQL_DESC_LENGTH 1003
#define SQL_DESC_OCTET_LENGTH_PTR 1004
#define SQL_DESC_PRECISION 1005
#define SQL_DESC_SCALE 1006
#define SQL_DESC_DATETIME_INTERVAL_CODE 1007
#define SQL_DESC_NULLABLE 1008
#define SQL_DESC_INDICATOR_PTR 1009
#define SQL_DESC_DATA_PTR 1010
#define SQL_DESC_NAME 1011
#define SQL_DESC_UNNAMED 1012
#define SQL_DESC_OCTET_LENGTH 1013
#define SQL_DESC_ALLOC_TYPE 1099
#define SQL_DIAG_RETURNCODE 1
#define SQL_DIAG_NUMBER 2
#define SQL_DIAG_ROW_COUNT 3
#define SQL_DIAG_SQLSTATE 4
#define SQL_DIAG_NATIVE 5
#define SQL_DIAG_MESSAGE_TEXT 6
#define SQL_DIAG_DYNAMIC_FUNCTION 7
#define SQL_DIAG_CLASS_ORIGIN 8
#define SQL_DIAG_SUBCLASS_ORIGIN 9
#define SQL_DIAG_CONNECTION_NAME 10
#define SQL_DIAG_SERVER_NAME 11
#define SQL_DIAG_DYNAMIC_FUNCTION_CODE 12
#define SQL_DIAG_ALTER_DOMAIN 3
#define SQL_DIAG_ALTER_TABLE 4
#define SQL_DIAG_CALL 7
#define SQL_DIAG_CREATE_ASSERTION 6
#define SQL_DIAG_CREATE_CHARACTER_SET 8
#define SQL_DIAG_CREATE_COLLATION 10
#define SQL_DIAG_CREATE_DOMAIN 23
#define SQL_DIAG_CREATE_INDEX (-1)
#define SQL_DIAG_CREATE_SCHEMA 64
#define SQL_DIAG_CREATE_TABLE 77
#define SQL_DIAG_CREATE_TRANSLATION 79
#define SQL_DIAG_CREATE_VIEW 84
#define SQL_DIAG_DELETE_WHERE 19
#define SQL_DIAG_DROP_ASSERTION 24
#define SQL_DIAG_DROP_CHARACTER_SET 25
#define SQL_DIAG_DROP_COLLATION 26
#define SQL_DIAG_DROP_DOMAIN 27
#define SQL_DIAG_DROP_INDEX (-2)
#define SQL_DIAG_DROP_SCHEMA 31
#define SQL_DIAG_DROP_TABLE 32
#define SQL_DIAG_DROP_TRANSLATION 33
#define SQL_DIAG_DROP_VIEW 36
#define SQL_DIAG_DYNAMIC_DELETE_CURSOR 38
#define SQL_DIAG_DYNAMIC_UPDATE_CURSOR 81
#define SQL_DIAG_GRANT 48
#define SQL_DIAG_INSERT 50
#define SQL_DIAG_REVOKE 59
#define SQL_DIAG_SELECT_CURSOR 85
#define SQL_DIAG_UNKNOWN_STATEMENT 0
#define SQL_DIAG_UPDATE_WHERE 82
#define SQL_UNKNOWN_TYPE 0
#define SQL_CHAR 1
#define SQL_NUMERIC 2
#define SQL_DECIMAL 3
#define SQL_INTEGER 4
#define SQL_SMALLINT 5
#define SQL_FLOAT 6
#define SQL_REAL 7
#define SQL_DOUBLE 8
#define SQL_DATETIME 9
#define SQL_VARCHAR 12
#define SQL_TYPE_DATE 91
#define SQL_TYPE_TIME 92
#define SQL_TYPE_TIMESTAMP 93
#define SQL_UNSPECIFIED 0
#define SQL_INSENSITIVE 1
#define SQL_SENSITIVE 2
#define SQL_ALL_TYPES 0
#define SQL_DEFAULT 99
#define SQL_ARD_TYPE (-99)
#define SQL_CODE_DATE 1
#define SQL_CODE_TIME 2
#define SQL_CODE_TIMESTAMP 3
#define SQL_FALSE 0
#define SQL_TRUE 1
#define SQL_NO_NULLS 0
#define SQL_NULLABLE 1
#define SQL_NULLABLE_UNKNOWN 2
#define SQL_PRED_NONE 0
#define SQL_PRED_CHAR 1
#define SQL_PRED_BASIC 2
#define SQL_NAMED 0
#define SQL_UNNAMED 1
#define SQL_DESC_ALLOC_AUTO 1
#define SQL_DESC_ALLOC_USER 2
#define SQL_CLOSE 0
#define SQL_DROP 1
#define SQL_UNBIND 2
#define SQL_RESET_PARAMS 3
#define SQL_FETCH_NEXT 1
#define SQL_FETCH_FIRST 2
#define SQL_FETCH_LAST 3
#define SQL_FETCH_PRIOR 4
#define SQL_FETCH_ABSOLUTE 5
#define SQL_FETCH_RELATIVE 6
#define SQL_COMMIT 0
#define SQL_ROLLBACK 1
#define SQL_NULL_HENV NULL
#define SQL_NULL_HDBC NULL
#define SQL_NULL_HSTMT NULL
#define SQL_NULL_HDESC NULL
#define SQL_NULL_HANDLE NULL
#define SQL_SCOPE_CURROW 0
#define SQL_SCOPE_TRANSACTION 1
#define SQL_SCOPE_SESSION 2
#define SQL_PC_UNKNOWN 0
#define SQL_PC_NON_PSEUDO 1
#define SQL_PC_PSEUDO 2
#define SQL_ROW_IDENTIFIER 1
#define SQL_INDEX_UNIQUE 0
#define SQL_INDEX_ALL 1
#define SQL_INDEX_CLUSTERED 1
#define SQL_INDEX_HASHED 2
#define SQL_INDEX_OTHER 3
#define SQL_API_SQLALLOCCONNECT 1
#define SQL_API_SQLALLOCENV 2
#define SQL_API_SQLALLOCSTMT 3
#define SQL_API_SQLBINDCOL 4
#define SQL_API_SQLCANCEL 5
#define SQL_API_SQLCOLUMNS 40
#define SQL_API_SQLCONNECT 7
#define SQL_API_SQLDATASOURCES 57
#define SQL_API_SQLDESCRIBECOL 8
#define SQL_API_SQLDISCONNECT 9
#define SQL_API_SQLERROR 10
#define SQL_API_SQLEXECDIRECT 11
#define SQL_API_SQLEXECUTE 12
#define SQL_API_SQLFETCH 13
#define SQL_API_SQLFREECONNECT 14
#define SQL_API_SQLFREEENV 15
#define SQL_API_SQLFREESTMT 16
#define SQL_API_SQLGETCONNECTOPTION 42
#define SQL_API_SQLGETCURSORNAME 17
#define SQL_API_SQLGETDATA 43
#define SQL_API_SQLGETFUNCTIONS 44
#define SQL_API_SQLGETINFO 45
#define SQL_API_SQLGETSTMTOPTION 46
#define SQL_API_SQLGETTYPEINFO 47
#define SQL_API_SQLNUMRESULTCOLS 18
#define SQL_API_SQLPARAMDATA 48
#define SQL_API_SQLPREPARE 19
#define SQL_API_SQLPUTDATA 49
#define SQL_API_SQLROWCOUNT 20
#define SQL_API_SQLSETCONNECTOPTION 50
#define SQL_API_SQLSETCURSORNAME 21
#define SQL_API_SQLSETPARAM 22
#define SQL_API_SQLSETSTMTOPTION 51
#define SQL_API_SQLSPECIALCOLUMNS 52
#define SQL_API_SQLSTATISTICS 53
#define SQL_API_SQLTABLES 54
#define SQL_API_SQLTRANSACT 23
#define SQL_API_SQLALLOCHANDLE 1001
#define SQL_API_SQLBINDPARAM 1002
#define SQL_API_SQLCLOSECURSOR 1003
#define SQL_API_SQLCOLATTRIBUTE 6
#define SQL_API_SQLCOPYDESC 1004
#define SQL_API_SQLENDTRAN 1005
#define SQL_API_SQLFETCHSCROLL 1021
#define SQL_API_SQLFREEHANDLE 1006
#define SQL_API_SQLGETCONNECTATTR 1007
#define SQL_API_SQLGETDESCFIELD 1008
#define SQL_API_SQLGETDESCREC 1009
#define SQL_API_SQLGETDIAGFIELD 1010
#define SQL_API_SQLGETDIAGREC 1011
#define SQL_API_SQLGETENVATTR 1012
#define SQL_API_SQLGETSTMTATTR 1014
#define SQL_API_SQLSETCONNECTATTR 1016
#define SQL_API_SQLSETDESCFIELD 1017
#define SQL_API_SQLSETDESCREC 1018
#define SQL_API_SQLSETENVATTR 1019
#define SQL_API_SQLSETSTMTATTR 1020
#define SQL_MAX_DRIVER_CONNECTIONS 0
#define SQL_MAXIMUM_DRIVER_CONNECTIONSSQL_MAX_DRIVER_CONNECTIONS
#define SQL_MAX_CONCURRENT_ACTIVITIES 1
#define SQL_MAXIMUM_CONCURRENT_ACTIVITIESSQL_MAX_CONCURRENT_ACTIVITIES
#define SQL_DATA_SOURCE_NAME 2
#define SQL_FETCH_DIRECTION 8
#define SQL_SERVER_NAME 13
#define SQL_SEARCH_PATTERN_ESCAPE 14
#define SQL_DBMS_NAME 17
#define SQL_DBMS_VER 18
#define SQL_ACCESSIBLE_TABLES 19
#define SQL_ACCESSIBLE_PROCEDURES 20
#define SQL_CURSOR_COMMIT_BEHAVIOR 23
#define SQL_DATA_SOURCE_READ_ONLY 25
#define SQL_DEFAULT_TXN_ISOLATION 26
#define SQL_IDENTIFIER_CASE 28
#define SQL_IDENTIFIER_QUOTE_CHAR 29
#define SQL_MAX_COLUMN_NAME_LEN 30
#define SQL_MAXIMUM_COLUMN_NAME_LENGTHSQL_MAX_COLUMN_NAME_LEN
#define SQL_MAX_CURSOR_NAME_LEN 31
#define SQL_MAXIMUM_CURSOR_NAME_LENGTHSQL_MAX_CURSOR_NAME_LEN
#define SQL_MAX_SCHEMA_NAME_LEN 32
#define SQL_MAXIMUM_SCHEMA_NAME_LENGTHSQL_MAX_SCHEMA_NAME_LEN
#define SQL_MAX_CATALOG_NAME_LEN 34
#define SQL_MAXIMUM_CATALOG_NAME_LENGTHSQL_MAX_CATALOG_NAME_LEN
#define SQL_MAX_TABLE_NAME_LEN 35
#define SQL_SCROLL_CONCURRENCY 43
#define SQL_TXN_CAPABLE 46
#define SQL_TRANSACTION_CAPABLESQL_TXN_CAPABLE
#define SQL_USER_NAME 47
#define SQL_TXN_ISOLATION_OPTION 72
#define SQL_TRANSACTION_ISOLATION_OPTIONSQL_TXN_ISOLATION_OPTION
#define SQL_INTEGRITY 73
#define SQL_GETDATA_EXTENSIONS 81
#define SQL_NULL_COLLATION 85
#define SQL_ALTER_TABLE 86
#define SQL_ORDER_BY_COLUMNS_IN_SELECT 90
#define SQL_SPECIAL_CHARACTERS 94
#define SQL_MAX_COLUMNS_IN_GROUP_BY 97
#define SQL_MAXIMUM_COLUMNS_IN_GROUP_BYSQL_MAX_COLUMNS_IN_GROUP_BY
#define SQL_MAX_COLUMNS_IN_INDEX 98
#define SQL_MAXIMUM_COLUMNS_IN_INDEXSQL_MAX_COLUMNS_IN_INDEX
#define SQL_MAX_COLUMNS_IN_ORDER_BY 99
#define SQL_MAXIMUM_COLUMNS_IN_ORDER_BYSQL_MAX_COLUMNS_IN_ORDER_BY
#define SQL_MAX_COLUMNS_IN_SELECT 100
#define SQL_MAXIMUM_COLUMNS_IN_SELECTSQL_MAX_COLUMNS_IN_SELECT
#define SQL_MAX_COLUMNS_IN_TABLE 101
#define SQL_MAX_INDEX_SIZE 102
#define SQL_MAXIMUM_INDEX_SIZESQL_MAX_INDEX_SIZE
#define SQL_MAX_ROW_SIZE 104
#define SQL_MAXIMUM_ROW_SIZESQL_MAX_ROW_SIZE
#define SQL_MAX_STATEMENT_LEN 105
#define SQL_MAXIMUM_STATEMENT_LENGTHSQL_MAX_STATEMENT_LEN
#define SQL_MAX_TABLES_IN_SELECT 106
#define SQL_MAXIMUM_TABLES_IN_SELECTSQL_MAX_TABLES_IN_SELECT
#define SQL_MAX_USER_NAME_LEN 107
#define SQL_MAXIMUM_USER_NAME_LENGTHSQL_MAX_USER_NAME_LEN
#define SQL_OJ_CAPABILITIES 115
#define SQL_OUTER_JOIN_CAPABILITIESSQL_OJ_CAPABILITIES
#define SQL_XOPEN_CLI_YEAR 10000
#define SQL_CURSOR_SENSITIVITY 10001
#define SQL_DESCRIBE_PARAMETER 10002
#define SQL_CATALOG_NAME 10003
#define SQL_COLLATION_SEQ 10004
#define SQL_MAX_IDENTIFIER_LEN 10005
#define SQL_MAXIMUM_IDENTIFIER_LENGTHSQL_MAX_IDENTIFIER_LEN
#define SQL_AT_ADD_COLUMN 0x00000001L
#define SQL_AT_DROP_COLUMN 0x00000002L
#define SQL_AT_ADD_CONSTRAINT 0x00000008L
#define SQL_AM_NONE 0
#define SQL_AM_CONNECTION 1
#define SQL_AM_STATEMENT 2
#define SQL_CB_DELETE 0
#define SQL_CB_CLOSE 1
#define SQL_CB_PRESERVE 2
#define SQL_FD_FETCH_NEXT 0x00000001L
#define SQL_FD_FETCH_FIRST 0x00000002L
#define SQL_FD_FETCH_LAST 0x00000004L
#define SQL_FD_FETCH_PRIOR 0x00000008L
#define SQL_FD_FETCH_ABSOLUTE 0x00000010L
#define SQL_FD_FETCH_RELATIVE 0x00000020L
#define SQL_GD_ANY_COLUMN 0x00000001L
#define SQL_GD_ANY_ORDER 0x00000002L
#define SQL_IC_UPPER 1
#define SQL_IC_LOWER 2
#define SQL_IC_SENSITIVE 3
#define SQL_IC_MIXED 4
#define SQL_OJ_LEFT 0x00000001L
#define SQL_OJ_RIGHT 0x00000002L
#define SQL_OJ_FULL 0x00000004L
#define SQL_OJ_NESTED 0x00000008L
#define SQL_OJ_NOT_ORDERED 0x00000010L
#define SQL_OJ_INNER 0x00000020L
#define SQL_OJ_ALL_COMPARISON_OPS 0x00000040L
#define SQL_SCCO_READ_ONLY 0x00000001L
#define SQL_SCCO_LOCK 0x00000002L
#define SQL_SCCO_OPT_ROWVER 0x00000004L
#define SQL_SCCO_OPT_VALUES 0x00000008L
#define SQL_TC_NONE 0
#define SQL_TC_DML 1
#define SQL_TC_ALL 2
#define SQL_TC_DDL_COMMIT 3
#define SQL_TC_DDL_IGNORE 4
#define SQL_TXN_READ_UNCOMMITTED 0x00000001L
#define SQL_TXN_READ_COMMITTED 0x00000002L
#define SQL_TXN_REPEATABLE_READ 0x00000004L
#define SQL_TXN_SERIALIZABLE 0x00000008L
#define SQL_NC_HIGH 0
#define SQL_NC_LOW 1

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 SQLEndTran (SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT CompletionType)
Requests a commit or rollback operation for all active operations on all statements associated with a connection. 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...

Detailed Description

Header for the Microsoft ODBC Core API.

Macro Definition Documentation

ODBCVER

#define ODBCVER 0x0351

SQL_ACCESSIBLE_PROCEDURES

#define SQL_ACCESSIBLE_PROCEDURES 20

SQL_ACCESSIBLE_TABLES

#define SQL_ACCESSIBLE_TABLES 19

SQL_ALL_TYPES

#define SQL_ALL_TYPES 0

SQL_ALTER_TABLE

#define SQL_ALTER_TABLE 86

SQL_AM_CONNECTION

#define SQL_AM_CONNECTION 1

SQL_AM_NONE

#define SQL_AM_NONE 0

SQL_AM_STATEMENT

#define SQL_AM_STATEMENT 2

SQL_API_SQLALLOCCONNECT

#define SQL_API_SQLALLOCCONNECT 1

SQL_API_SQLALLOCENV

#define SQL_API_SQLALLOCENV 2

SQL_API_SQLALLOCHANDLE

#define SQL_API_SQLALLOCHANDLE 1001

SQL_API_SQLALLOCSTMT

#define SQL_API_SQLALLOCSTMT 3

SQL_API_SQLBINDCOL

#define SQL_API_SQLBINDCOL 4

SQL_API_SQLBINDPARAM

#define SQL_API_SQLBINDPARAM 1002

SQL_API_SQLCANCEL

#define SQL_API_SQLCANCEL 5

SQL_API_SQLCLOSECURSOR

#define SQL_API_SQLCLOSECURSOR 1003

SQL_API_SQLCOLATTRIBUTE

#define SQL_API_SQLCOLATTRIBUTE 6

SQL_API_SQLCOLUMNS

#define SQL_API_SQLCOLUMNS 40

SQL_API_SQLCONNECT

#define SQL_API_SQLCONNECT 7

SQL_API_SQLCOPYDESC

#define SQL_API_SQLCOPYDESC 1004

SQL_API_SQLDATASOURCES

#define SQL_API_SQLDATASOURCES 57

SQL_API_SQLDESCRIBECOL

#define SQL_API_SQLDESCRIBECOL 8

SQL_API_SQLDISCONNECT

#define SQL_API_SQLDISCONNECT 9

SQL_API_SQLENDTRAN

#define SQL_API_SQLENDTRAN 1005

SQL_API_SQLERROR

#define SQL_API_SQLERROR 10

SQL_API_SQLEXECDIRECT

#define SQL_API_SQLEXECDIRECT 11

SQL_API_SQLEXECUTE

#define SQL_API_SQLEXECUTE 12

SQL_API_SQLFETCH

#define SQL_API_SQLFETCH 13

SQL_API_SQLFETCHSCROLL

#define SQL_API_SQLFETCHSCROLL 1021

SQL_API_SQLFREECONNECT

#define SQL_API_SQLFREECONNECT 14

SQL_API_SQLFREEENV

#define SQL_API_SQLFREEENV 15

SQL_API_SQLFREEHANDLE

#define SQL_API_SQLFREEHANDLE 1006

SQL_API_SQLFREESTMT

#define SQL_API_SQLFREESTMT 16

SQL_API_SQLGETCONNECTATTR

#define SQL_API_SQLGETCONNECTATTR 1007

SQL_API_SQLGETCONNECTOPTION

#define SQL_API_SQLGETCONNECTOPTION 42

SQL_API_SQLGETCURSORNAME

#define SQL_API_SQLGETCURSORNAME 17

SQL_API_SQLGETDATA

#define SQL_API_SQLGETDATA 43

SQL_API_SQLGETDESCFIELD

#define SQL_API_SQLGETDESCFIELD 1008

SQL_API_SQLGETDESCREC

#define SQL_API_SQLGETDESCREC 1009

SQL_API_SQLGETDIAGFIELD

#define SQL_API_SQLGETDIAGFIELD 1010

SQL_API_SQLGETDIAGREC

#define SQL_API_SQLGETDIAGREC 1011

SQL_API_SQLGETENVATTR

#define SQL_API_SQLGETENVATTR 1012

SQL_API_SQLGETFUNCTIONS

#define SQL_API_SQLGETFUNCTIONS 44

SQL_API_SQLGETINFO

#define SQL_API_SQLGETINFO 45

SQL_API_SQLGETSTMTATTR

#define SQL_API_SQLGETSTMTATTR 1014

SQL_API_SQLGETSTMTOPTION

#define SQL_API_SQLGETSTMTOPTION 46

SQL_API_SQLGETTYPEINFO

#define SQL_API_SQLGETTYPEINFO 47

SQL_API_SQLNUMRESULTCOLS

#define SQL_API_SQLNUMRESULTCOLS 18

SQL_API_SQLPARAMDATA

#define SQL_API_SQLPARAMDATA 48

SQL_API_SQLPREPARE

#define SQL_API_SQLPREPARE 19

SQL_API_SQLPUTDATA

#define SQL_API_SQLPUTDATA 49

SQL_API_SQLROWCOUNT

#define SQL_API_SQLROWCOUNT 20

SQL_API_SQLSETCONNECTATTR

#define SQL_API_SQLSETCONNECTATTR 1016

SQL_API_SQLSETCONNECTOPTION

#define SQL_API_SQLSETCONNECTOPTION 50

SQL_API_SQLSETCURSORNAME

#define SQL_API_SQLSETCURSORNAME 21

SQL_API_SQLSETDESCFIELD

#define SQL_API_SQLSETDESCFIELD 1017

SQL_API_SQLSETDESCREC

#define SQL_API_SQLSETDESCREC 1018

SQL_API_SQLSETENVATTR

#define SQL_API_SQLSETENVATTR 1019

SQL_API_SQLSETPARAM

#define SQL_API_SQLSETPARAM 22

SQL_API_SQLSETSTMTATTR

#define SQL_API_SQLSETSTMTATTR 1020

SQL_API_SQLSETSTMTOPTION

#define SQL_API_SQLSETSTMTOPTION 51

SQL_API_SQLSPECIALCOLUMNS

#define SQL_API_SQLSPECIALCOLUMNS 52

SQL_API_SQLSTATISTICS

#define SQL_API_SQLSTATISTICS 53

SQL_API_SQLTABLES

#define SQL_API_SQLTABLES 54

SQL_API_SQLTRANSACT

#define SQL_API_SQLTRANSACT 23

SQL_ARD_TYPE

#define SQL_ARD_TYPE (-99)

SQL_AT_ADD_COLUMN

#define SQL_AT_ADD_COLUMN 0x00000001L

SQL_AT_ADD_CONSTRAINT

#define SQL_AT_ADD_CONSTRAINT 0x00000008L

SQL_AT_DROP_COLUMN

#define SQL_AT_DROP_COLUMN 0x00000002L

SQL_ATTR_APP_PARAM_DESC

#define SQL_ATTR_APP_PARAM_DESC 10011

SQL_ATTR_APP_ROW_DESC

#define SQL_ATTR_APP_ROW_DESC 10010

SQL_ATTR_AUTO_IPD

#define SQL_ATTR_AUTO_IPD 10001

SQL_ATTR_CURSOR_SCROLLABLE

#define SQL_ATTR_CURSOR_SCROLLABLE (-1)

SQL_ATTR_CURSOR_SENSITIVITY

#define SQL_ATTR_CURSOR_SENSITIVITY (-2)

SQL_ATTR_IMP_PARAM_DESC

#define SQL_ATTR_IMP_PARAM_DESC 10013

SQL_ATTR_IMP_ROW_DESC

#define SQL_ATTR_IMP_ROW_DESC 10012

SQL_ATTR_METADATA_ID

#define SQL_ATTR_METADATA_ID 10014

SQL_ATTR_OUTPUT_NTS

#define SQL_ATTR_OUTPUT_NTS 10001

SQL_CATALOG_NAME

#define SQL_CATALOG_NAME 10003

SQL_CB_CLOSE

#define SQL_CB_CLOSE 1

SQL_CB_DELETE

#define SQL_CB_DELETE 0

SQL_CB_PRESERVE

#define SQL_CB_PRESERVE 2

SQL_CHAR

#define SQL_CHAR 1

SQL_CLOSE

#define SQL_CLOSE 0

SQL_CODE_DATE

#define SQL_CODE_DATE 1

SQL_CODE_TIME

#define SQL_CODE_TIME 2

SQL_CODE_TIMESTAMP

#define SQL_CODE_TIMESTAMP 3

SQL_COLLATION_SEQ

#define SQL_COLLATION_SEQ 10004

SQL_COMMIT

#define SQL_COMMIT 0

SQL_CURSOR_COMMIT_BEHAVIOR

#define SQL_CURSOR_COMMIT_BEHAVIOR 23

SQL_CURSOR_SENSITIVITY

#define SQL_CURSOR_SENSITIVITY 10001

SQL_DATA_AT_EXEC

#define SQL_DATA_AT_EXEC (-2)

SQL_DATA_SOURCE_NAME

#define SQL_DATA_SOURCE_NAME 2

SQL_DATA_SOURCE_READ_ONLY

#define SQL_DATA_SOURCE_READ_ONLY 25

SQL_DATE_LEN

#define SQL_DATE_LEN 10

SQL_DATETIME

#define SQL_DATETIME 9

SQL_DBMS_NAME

#define SQL_DBMS_NAME 17

SQL_DBMS_VER

#define SQL_DBMS_VER 18

SQL_DECIMAL

#define SQL_DECIMAL 3

SQL_DEFAULT

#define SQL_DEFAULT 99

SQL_DEFAULT_TXN_ISOLATION

#define SQL_DEFAULT_TXN_ISOLATION 26

SQL_DESC_ALLOC_AUTO

#define SQL_DESC_ALLOC_AUTO 1

SQL_DESC_ALLOC_TYPE

#define SQL_DESC_ALLOC_TYPE 1099

SQL_DESC_ALLOC_USER

#define SQL_DESC_ALLOC_USER 2

SQL_DESC_COUNT

#define SQL_DESC_COUNT 1001

SQL_DESC_DATA_PTR

#define SQL_DESC_DATA_PTR 1010

SQL_DESC_DATETIME_INTERVAL_CODE

#define SQL_DESC_DATETIME_INTERVAL_CODE 1007

SQL_DESC_INDICATOR_PTR

#define SQL_DESC_INDICATOR_PTR 1009

SQL_DESC_LENGTH

#define SQL_DESC_LENGTH 1003

SQL_DESC_NAME

#define SQL_DESC_NAME 1011

SQL_DESC_NULLABLE

#define SQL_DESC_NULLABLE 1008

SQL_DESC_OCTET_LENGTH

#define SQL_DESC_OCTET_LENGTH 1013

SQL_DESC_OCTET_LENGTH_PTR

#define SQL_DESC_OCTET_LENGTH_PTR 1004

SQL_DESC_PRECISION

#define SQL_DESC_PRECISION 1005

SQL_DESC_SCALE

#define SQL_DESC_SCALE 1006

SQL_DESC_TYPE

#define SQL_DESC_TYPE 1002

SQL_DESC_UNNAMED

#define SQL_DESC_UNNAMED 1012

SQL_DESCRIBE_PARAMETER

#define SQL_DESCRIBE_PARAMETER 10002

SQL_DIAG_ALTER_DOMAIN

#define SQL_DIAG_ALTER_DOMAIN 3

SQL_DIAG_ALTER_TABLE

#define SQL_DIAG_ALTER_TABLE 4

SQL_DIAG_CALL

#define SQL_DIAG_CALL 7

SQL_DIAG_CLASS_ORIGIN

#define SQL_DIAG_CLASS_ORIGIN 8

SQL_DIAG_CONNECTION_NAME

#define SQL_DIAG_CONNECTION_NAME 10

SQL_DIAG_CREATE_ASSERTION

#define SQL_DIAG_CREATE_ASSERTION 6

SQL_DIAG_CREATE_CHARACTER_SET

#define SQL_DIAG_CREATE_CHARACTER_SET 8

SQL_DIAG_CREATE_COLLATION

#define SQL_DIAG_CREATE_COLLATION 10

SQL_DIAG_CREATE_DOMAIN

#define SQL_DIAG_CREATE_DOMAIN 23

SQL_DIAG_CREATE_INDEX

#define SQL_DIAG_CREATE_INDEX (-1)

SQL_DIAG_CREATE_SCHEMA

#define SQL_DIAG_CREATE_SCHEMA 64

SQL_DIAG_CREATE_TABLE

#define SQL_DIAG_CREATE_TABLE 77

SQL_DIAG_CREATE_TRANSLATION

#define SQL_DIAG_CREATE_TRANSLATION 79

SQL_DIAG_CREATE_VIEW

#define SQL_DIAG_CREATE_VIEW 84

SQL_DIAG_DELETE_WHERE

#define SQL_DIAG_DELETE_WHERE 19

SQL_DIAG_DROP_ASSERTION

#define SQL_DIAG_DROP_ASSERTION 24

SQL_DIAG_DROP_CHARACTER_SET

#define SQL_DIAG_DROP_CHARACTER_SET 25

SQL_DIAG_DROP_COLLATION

#define SQL_DIAG_DROP_COLLATION 26

SQL_DIAG_DROP_DOMAIN

#define SQL_DIAG_DROP_DOMAIN 27

SQL_DIAG_DROP_INDEX

#define SQL_DIAG_DROP_INDEX (-2)

SQL_DIAG_DROP_SCHEMA

#define SQL_DIAG_DROP_SCHEMA 31

SQL_DIAG_DROP_TABLE

#define SQL_DIAG_DROP_TABLE 32

SQL_DIAG_DROP_TRANSLATION

#define SQL_DIAG_DROP_TRANSLATION 33

SQL_DIAG_DROP_VIEW

#define SQL_DIAG_DROP_VIEW 36

SQL_DIAG_DYNAMIC_DELETE_CURSOR

#define SQL_DIAG_DYNAMIC_DELETE_CURSOR 38

SQL_DIAG_DYNAMIC_FUNCTION

#define SQL_DIAG_DYNAMIC_FUNCTION 7

SQL_DIAG_DYNAMIC_FUNCTION_CODE

#define SQL_DIAG_DYNAMIC_FUNCTION_CODE 12

SQL_DIAG_DYNAMIC_UPDATE_CURSOR

#define SQL_DIAG_DYNAMIC_UPDATE_CURSOR 81

SQL_DIAG_GRANT

#define SQL_DIAG_GRANT 48

SQL_DIAG_INSERT

#define SQL_DIAG_INSERT 50

SQL_DIAG_MESSAGE_TEXT

#define SQL_DIAG_MESSAGE_TEXT 6

SQL_DIAG_NATIVE

#define SQL_DIAG_NATIVE 5

SQL_DIAG_NUMBER

#define SQL_DIAG_NUMBER 2

SQL_DIAG_RETURNCODE

#define SQL_DIAG_RETURNCODE 1

SQL_DIAG_REVOKE

#define SQL_DIAG_REVOKE 59

SQL_DIAG_ROW_COUNT

#define SQL_DIAG_ROW_COUNT 3

SQL_DIAG_SELECT_CURSOR

#define SQL_DIAG_SELECT_CURSOR 85

SQL_DIAG_SERVER_NAME

#define SQL_DIAG_SERVER_NAME 11

SQL_DIAG_SQLSTATE

#define SQL_DIAG_SQLSTATE 4

SQL_DIAG_SUBCLASS_ORIGIN

#define SQL_DIAG_SUBCLASS_ORIGIN 9

SQL_DIAG_UNKNOWN_STATEMENT

#define SQL_DIAG_UNKNOWN_STATEMENT 0

SQL_DIAG_UPDATE_WHERE

#define SQL_DIAG_UPDATE_WHERE 82

SQL_DOUBLE

#define SQL_DOUBLE 8

SQL_DROP

#define SQL_DROP 1

SQL_ERROR

#define SQL_ERROR (-1)

SQL API Return Code.

Function failed. Use the SQLGetDiagRec() function to retrieve the error information.

Examples
tfsrdbc/rdbcTfsAlloc.c, and tfsrdbc/rdbcTfsAllocDefault.c.

SQL_FALSE

#define SQL_FALSE 0

SQL_FD_FETCH_ABSOLUTE

#define SQL_FD_FETCH_ABSOLUTE 0x00000010L

SQL_FD_FETCH_FIRST

#define SQL_FD_FETCH_FIRST 0x00000002L

SQL_FD_FETCH_LAST

#define SQL_FD_FETCH_LAST 0x00000004L

SQL_FD_FETCH_NEXT

#define SQL_FD_FETCH_NEXT 0x00000001L

SQL_FD_FETCH_PRIOR

#define SQL_FD_FETCH_PRIOR 0x00000008L

SQL_FD_FETCH_RELATIVE

#define SQL_FD_FETCH_RELATIVE 0x00000020L

SQL_FETCH_ABSOLUTE

#define SQL_FETCH_ABSOLUTE 5

SQL_FETCH_DIRECTION

#define SQL_FETCH_DIRECTION 8

SQL_FETCH_FIRST

#define SQL_FETCH_FIRST 2

SQL_FETCH_LAST

#define SQL_FETCH_LAST 3

SQL_FETCH_NEXT

#define SQL_FETCH_NEXT 1

SQL_FETCH_PRIOR

#define SQL_FETCH_PRIOR 4

SQL_FETCH_RELATIVE

#define SQL_FETCH_RELATIVE 6

SQL_FLOAT

#define SQL_FLOAT 6

SQL_GD_ANY_COLUMN

#define SQL_GD_ANY_COLUMN 0x00000001L

SQL_GD_ANY_ORDER

#define SQL_GD_ANY_ORDER 0x00000002L

SQL_GETDATA_EXTENSIONS

#define SQL_GETDATA_EXTENSIONS 81

SQL_HANDLE_DBC

SQL_HANDLE_DESC

#define SQL_HANDLE_DESC 4

SQL_HANDLE_ENV

SQL_HANDLE_STMT

#define SQL_HANDLE_STMT 3

SQL_IC_LOWER

#define SQL_IC_LOWER 2

SQL_IC_MIXED

#define SQL_IC_MIXED 4

SQL_IC_SENSITIVE

#define SQL_IC_SENSITIVE 3

SQL_IC_UPPER

#define SQL_IC_UPPER 1

SQL_IDENTIFIER_CASE

#define SQL_IDENTIFIER_CASE 28

SQL_IDENTIFIER_QUOTE_CHAR

#define SQL_IDENTIFIER_QUOTE_CHAR 29

SQL_INDEX_ALL

#define SQL_INDEX_ALL 1

SQL_INDEX_CLUSTERED

#define SQL_INDEX_CLUSTERED 1

SQL_INDEX_HASHED

#define SQL_INDEX_HASHED 2

SQL_INDEX_OTHER

#define SQL_INDEX_OTHER 3

SQL_INDEX_UNIQUE

#define SQL_INDEX_UNIQUE 0

SQL_INSENSITIVE

#define SQL_INSENSITIVE 1

SQL_INTEGER

#define SQL_INTEGER 4

SQL_INTEGRITY

#define SQL_INTEGRITY 73

SQL_INVALID_HANDLE

#define SQL_INVALID_HANDLE (-2)

SQL API Return Code.

Function failed because an invalid environment, connection, statement, or descriptor handle was provided as an argument.

SQL_MAX_CATALOG_NAME_LEN

#define SQL_MAX_CATALOG_NAME_LEN 34

SQL_MAX_COLUMN_NAME_LEN

#define SQL_MAX_COLUMN_NAME_LEN 30

SQL_MAX_COLUMNS_IN_GROUP_BY

#define SQL_MAX_COLUMNS_IN_GROUP_BY 97

SQL_MAX_COLUMNS_IN_INDEX

#define SQL_MAX_COLUMNS_IN_INDEX 98

SQL_MAX_COLUMNS_IN_ORDER_BY

#define SQL_MAX_COLUMNS_IN_ORDER_BY 99

SQL_MAX_COLUMNS_IN_SELECT

#define SQL_MAX_COLUMNS_IN_SELECT 100

SQL_MAX_COLUMNS_IN_TABLE

#define SQL_MAX_COLUMNS_IN_TABLE 101

SQL_MAX_CONCURRENT_ACTIVITIES

#define SQL_MAX_CONCURRENT_ACTIVITIES 1

SQL_MAX_CURSOR_NAME_LEN

#define SQL_MAX_CURSOR_NAME_LEN 31

SQL_MAX_DRIVER_CONNECTIONS

#define SQL_MAX_DRIVER_CONNECTIONS 0

SQL_MAX_IDENTIFIER_LEN

#define SQL_MAX_IDENTIFIER_LEN 10005

SQL_MAX_INDEX_SIZE

#define SQL_MAX_INDEX_SIZE 102

SQL_MAX_MESSAGE_LENGTH

#define SQL_MAX_MESSAGE_LENGTH 512

SQL_MAX_ROW_SIZE

#define SQL_MAX_ROW_SIZE 104

SQL_MAX_SCHEMA_NAME_LEN

#define SQL_MAX_SCHEMA_NAME_LEN 32

SQL_MAX_STATEMENT_LEN

#define SQL_MAX_STATEMENT_LEN 105

SQL_MAX_TABLE_NAME_LEN

#define SQL_MAX_TABLE_NAME_LEN 35

SQL_MAX_TABLES_IN_SELECT

#define SQL_MAX_TABLES_IN_SELECT 106

SQL_MAX_USER_NAME_LEN

#define SQL_MAX_USER_NAME_LEN 107

SQL_MAXIMUM_CATALOG_NAME_LENGTH

#define SQL_MAXIMUM_CATALOG_NAME_LENGTH SQL_MAX_CATALOG_NAME_LEN

SQL_MAXIMUM_COLUMN_NAME_LENGTH

#define SQL_MAXIMUM_COLUMN_NAME_LENGTH SQL_MAX_COLUMN_NAME_LEN

SQL_MAXIMUM_COLUMNS_IN_GROUP_BY

#define SQL_MAXIMUM_COLUMNS_IN_GROUP_BY SQL_MAX_COLUMNS_IN_GROUP_BY

SQL_MAXIMUM_COLUMNS_IN_INDEX

#define SQL_MAXIMUM_COLUMNS_IN_INDEX SQL_MAX_COLUMNS_IN_INDEX

SQL_MAXIMUM_COLUMNS_IN_ORDER_BY

#define SQL_MAXIMUM_COLUMNS_IN_ORDER_BY SQL_MAX_COLUMNS_IN_ORDER_BY

SQL_MAXIMUM_COLUMNS_IN_SELECT

#define SQL_MAXIMUM_COLUMNS_IN_SELECT SQL_MAX_COLUMNS_IN_SELECT

SQL_MAXIMUM_CONCURRENT_ACTIVITIES

#define SQL_MAXIMUM_CONCURRENT_ACTIVITIES SQL_MAX_CONCURRENT_ACTIVITIES

SQL_MAXIMUM_CURSOR_NAME_LENGTH

#define SQL_MAXIMUM_CURSOR_NAME_LENGTH SQL_MAX_CURSOR_NAME_LEN

SQL_MAXIMUM_DRIVER_CONNECTIONS

#define SQL_MAXIMUM_DRIVER_CONNECTIONS SQL_MAX_DRIVER_CONNECTIONS

SQL_MAXIMUM_IDENTIFIER_LENGTH

#define SQL_MAXIMUM_IDENTIFIER_LENGTH SQL_MAX_IDENTIFIER_LEN

SQL_MAXIMUM_INDEX_SIZE

#define SQL_MAXIMUM_INDEX_SIZE SQL_MAX_INDEX_SIZE

SQL_MAXIMUM_ROW_SIZE

#define SQL_MAXIMUM_ROW_SIZE SQL_MAX_ROW_SIZE

SQL_MAXIMUM_SCHEMA_NAME_LENGTH

#define SQL_MAXIMUM_SCHEMA_NAME_LENGTH SQL_MAX_SCHEMA_NAME_LEN

SQL_MAXIMUM_STATEMENT_LENGTH

#define SQL_MAXIMUM_STATEMENT_LENGTH SQL_MAX_STATEMENT_LEN

SQL_MAXIMUM_TABLES_IN_SELECT

#define SQL_MAXIMUM_TABLES_IN_SELECT SQL_MAX_TABLES_IN_SELECT

SQL_MAXIMUM_USER_NAME_LENGTH

#define SQL_MAXIMUM_USER_NAME_LENGTH SQL_MAX_USER_NAME_LEN

SQL_NAMED

#define SQL_NAMED 0

SQL_NC_HIGH

#define SQL_NC_HIGH 0

SQL_NC_LOW

#define SQL_NC_LOW 1

SQL_NEED_DATA

#define SQL_NEED_DATA 99

SQL API Return Code.

More data is needed, such as when parameter data is sent at execution time.

SQL_NO_DATA

#define SQL_NO_DATA 100

SQL API Return Code.

No more data was available.

SQL_NO_NULLS

#define SQL_NO_NULLS 0

SQL_NONSCROLLABLE

#define SQL_NONSCROLLABLE 0

SQL_NTS

SQL_NTSL

#define SQL_NTSL (-3L)

SQL_NULL_COLLATION

#define SQL_NULL_COLLATION 85

SQL_NULL_DATA

#define SQL_NULL_DATA (-1)

Special length/indicator values.

SQL_NULL_HANDLE

#define SQL_NULL_HANDLE NULL

SQL_NULL_HDBC

#define SQL_NULL_HDBC NULL

SQL_NULL_HDESC

#define SQL_NULL_HDESC NULL

SQL_NULL_HENV

#define SQL_NULL_HENV NULL

SQL_NULL_HSTMT

#define SQL_NULL_HSTMT NULL

SQL_NULLABLE

#define SQL_NULLABLE 1

SQL_NULLABLE_UNKNOWN

#define SQL_NULLABLE_UNKNOWN 2

SQL_NUMERIC

#define SQL_NUMERIC 2

SQL_OJ_ALL_COMPARISON_OPS

#define SQL_OJ_ALL_COMPARISON_OPS 0x00000040L

SQL_OJ_CAPABILITIES

#define SQL_OJ_CAPABILITIES 115

SQL_OJ_FULL

#define SQL_OJ_FULL 0x00000004L

SQL_OJ_INNER

#define SQL_OJ_INNER 0x00000020L

SQL_OJ_LEFT

#define SQL_OJ_LEFT 0x00000001L

SQL_OJ_NESTED

#define SQL_OJ_NESTED 0x00000008L

SQL_OJ_NOT_ORDERED

#define SQL_OJ_NOT_ORDERED 0x00000010L

SQL_OJ_RIGHT

#define SQL_OJ_RIGHT 0x00000002L

SQL_ORDER_BY_COLUMNS_IN_SELECT

#define SQL_ORDER_BY_COLUMNS_IN_SELECT 90

SQL_OUTER_JOIN_CAPABILITIES

#define SQL_OUTER_JOIN_CAPABILITIES SQL_OJ_CAPABILITIES

SQL_PC_NON_PSEUDO

#define SQL_PC_NON_PSEUDO 1

SQL_PC_PSEUDO

#define SQL_PC_PSEUDO 2

SQL_PC_UNKNOWN

#define SQL_PC_UNKNOWN 0

SQL_PRED_BASIC

#define SQL_PRED_BASIC 2

SQL_PRED_CHAR

#define SQL_PRED_CHAR 1

SQL_PRED_NONE

#define SQL_PRED_NONE 0

SQL_REAL

#define SQL_REAL 7

SQL_RESET_PARAMS

#define SQL_RESET_PARAMS 3

SQL_ROLLBACK

#define SQL_ROLLBACK 1

SQL_ROW_IDENTIFIER

#define SQL_ROW_IDENTIFIER 1

SQL_SCCO_LOCK

#define SQL_SCCO_LOCK 0x00000002L

SQL_SCCO_OPT_ROWVER

#define SQL_SCCO_OPT_ROWVER 0x00000004L

SQL_SCCO_OPT_VALUES

#define SQL_SCCO_OPT_VALUES 0x00000008L

SQL_SCCO_READ_ONLY

#define SQL_SCCO_READ_ONLY 0x00000001L

SQL_SCOPE_CURROW

#define SQL_SCOPE_CURROW 0

SQL_SCOPE_SESSION

#define SQL_SCOPE_SESSION 2

SQL_SCOPE_TRANSACTION

#define SQL_SCOPE_TRANSACTION 1

SQL_SCROLL_CONCURRENCY

#define SQL_SCROLL_CONCURRENCY 43

SQL_SCROLLABLE

#define SQL_SCROLLABLE 1

SQL_SEARCH_PATTERN_ESCAPE

#define SQL_SEARCH_PATTERN_ESCAPE 14

SQL_SENSITIVE

#define SQL_SENSITIVE 2

SQL_SERVER_NAME

#define SQL_SERVER_NAME 13

SQL_SMALLINT

#define SQL_SMALLINT 5

SQL_SPECIAL_CHARACTERS

#define SQL_SPECIAL_CHARACTERS 94

SQL_SUCCEEDED

#define SQL_SUCCEEDED ( rc ) (((rc) & (~1)) == 0)

SQL_SUCCESS

#define SQL_SUCCESS 0

SQL API Return Code.

Function completed successfully.

Examples
odbc01Example_main.c, tfsrdbc/rdbcTfsAlloc.c, and tfsrdbc/rdbcTfsAllocDefault.c.

SQL_SUCCESS_WITH_INFO

#define SQL_SUCCESS_WITH_INFO 1

SQL API Return Code.

Function completed successfully, with a nonfatal status information. Use the SQLGetDiagRec() function to retrieve the additional information.

SQL_TC_ALL

#define SQL_TC_ALL 2

SQL_TC_DDL_COMMIT

#define SQL_TC_DDL_COMMIT 3

SQL_TC_DDL_IGNORE

#define SQL_TC_DDL_IGNORE 4

SQL_TC_DML

#define SQL_TC_DML 1

SQL_TC_NONE

#define SQL_TC_NONE 0

SQL_TIME_LEN

#define SQL_TIME_LEN 8 /* add P+1 if precision is nonzero */

SQL_TIMESTAMP_LEN

#define SQL_TIMESTAMP_LEN 19 /* add P+1 if precision is nonzero */

SQL_TRANSACTION_CAPABLE

#define SQL_TRANSACTION_CAPABLE SQL_TXN_CAPABLE

SQL_TRANSACTION_ISOLATION_OPTION

#define SQL_TRANSACTION_ISOLATION_OPTION SQL_TXN_ISOLATION_OPTION

SQL_TRUE

#define SQL_TRUE 1

SQL_TXN_CAPABLE

#define SQL_TXN_CAPABLE 46

SQL_TXN_ISOLATION_OPTION

#define SQL_TXN_ISOLATION_OPTION 72

SQL_TXN_READ_COMMITTED

#define SQL_TXN_READ_COMMITTED 0x00000002L

SQL_TXN_READ_UNCOMMITTED

#define SQL_TXN_READ_UNCOMMITTED 0x00000001L

SQL_TXN_REPEATABLE_READ

#define SQL_TXN_REPEATABLE_READ 0x00000004L

SQL_TXN_SERIALIZABLE

#define SQL_TXN_SERIALIZABLE 0x00000008L

SQL_TYPE_DATE

#define SQL_TYPE_DATE 91

SQL_TYPE_TIME

#define SQL_TYPE_TIME 92

SQL_TYPE_TIMESTAMP

#define SQL_TYPE_TIMESTAMP 93

SQL_UNBIND

#define SQL_UNBIND 2

SQL_UNKNOWN_TYPE

#define SQL_UNKNOWN_TYPE 0

SQL_UNNAMED

#define SQL_UNNAMED 1

SQL_UNSPECIFIED

#define SQL_UNSPECIFIED 0

SQL_USER_NAME

#define SQL_USER_NAME 47

SQL_VARCHAR

#define SQL_VARCHAR 12

SQL_XOPEN_CLI_YEAR

#define SQL_XOPEN_CLI_YEAR 10000

Function Documentation

SQLEndTran()

RDBC_EXPORT SQLRETURN SQLEndTran ( SQLSMALLINT HandleType,
SQLHANDLE Handle,
SQLSMALLINT CompletionType
)

Requests a commit or rollback operation for all active operations on all statements associated with a connection.

Examples
odbc01Example_main.c.