Background documentationLevel 1 API Locate this document in the navigation structure

 

SAP MaxDB ODBC Driver for the Level 1 API: Function Overview

Function

Note

SQLBindParameter

-

SQLColumns

-

SQLDriverConnect

Keyword for the name of the database computer: SERVERNODE

Keyword for the name of the database instance: SERVERDB

SQLGetConnectAttr

See below

SQLGetData

-

SQLGetFunctions

See below

SQLGetInfo

See below

SQLGetStmtAttr

-

SQLGetTypeInfo

You can determine the data types supported by the MaxDB database system using the function SQLGetTypeInfo.

More information: Supported Data Types

SQLParamData

-

SQLPutData

-

SQLSetConnectAttr

See SQLGetConnectAttr

SQLSetParam

-

SQLSetStmtAttr

-

SQLSpecialColumns

-

SQLStatistics

-

SQLTables

The SAP MaxDB ODBC driver supports the following table types (szTableType): ALIAS, RESULT, SNAPSHOT, SYSTEM, SYSTEM TABLE, TABLE, UNLOADED, VIEW

Remarks for SQLGetConnectAtt
SAP MaxDB ODBC Driver: Supported Attributes and Return Codes for SQLGetConnectAtt

Attribute

Return Values

SQL_ ATTR_ACCESS_MODE

pvParam = SQL_MODE_READ_WRITE

SQL_ ATTR_AUTOCOMMIT

pvParam = SQL_AUTOCOMMIT_ON

SQL_ATTR_CONNECTION_DEAD

-

SQL_ATTR_CURRENT_CATALOG

-

SQL_ ATTR_LOGIN_TIMEOUT

pvParam = 15

SQL_ATTR_ODBC_CURSORS

-

SQL_ATTR_QUIET_MODE

-

SQL_ ATTR_OPT_TRACE

pvParam = SQL_OPT_TRACE_OFF =0

SQL_ ATTR_OPT_TRACEFILE

The file name set with SQLSetConnectAttr, default value: \SQL.LOG

SQL_ ATTR_TRANSLATE_LIB

-

SQL_ ATTR_TRANSLATE_OPTION

pvParam = 0

SQL_ ATTR_TXN_ISOLATION

pvParam = SQL_TXN_REPEATABLE_READ

SQL_ MODE = SQL_CONNECT_OPT_START + 2

pvParam = (1 = INTERNAL, 2 = DB2, 3 = ANSI, 4 = ORACLE)

Remarks for SQLGetFunctions

If the function ID SQL_API_ODBC3_ALL_FUNCTION is specified, the macro SQL_FUNC_EXISTS returns the result TRUE for the following values:

SQL_API_SQLALLOCCONNECT

SQL_API_SQLALLOCENV

SQL_API_SQLALLOCHANDLE

SQL_API_SQLALLOCHANDLESTD

SQL_API_SQLALLOCSTMT

SQL_API_SQLBINDCOL

SQL_API_SQLBINDPARAM

SQL_API_SQLBINDPARAMETER

SQL_API_SQLBROWSECONNECT

SQL_API_SQLBULKOPERATIONS

SQL_API_SQLCANCEL

SQL_API_SQLCLOSECURSOR

SQL_API_SQLCOLATTRIBUTES

SQL_API_SQLCOLUMNPRIVILEGES

SQL_API_SQLCOLUMNS

SQL_API_SQLCONNECT

SQL_API_SQLCOPYDESC

SQL_API_SQLDATASOURCES

SQL_API_SQLDESCRIBECOL

SQL_API_SQLDESCRIBEPARAM

SQL_API_SQLDISCONNECT

SQL_API_SQLDRIVERCONNECT

SQL_API_SQLDRIVERS

SQL_API_SQLENDTRAN

SQL_API_SQLERROR

SQL_API_SQLEXECDIRECT

SQL_API_SQLEXECUTE

SQL_API_SQLEXTENDEDFETCH

SQL_API_SQLFETCH

SQL_API_SQLFETCHSCROLL

SQL_API_SQLFOREIGNKEYS

SQL_API_SQLFREECONNECT

SQL_API_SQLFREEENV

SQL_API_SQLFREEHANDLE

SQL_API_SQLFREESTMT

SQL_API_SQLGETCONNECTATTR

SQL_API_SQLGETCONNECTOPTION

SQL_API_SQLGETCURSORNAME

SQL_API_SQLGETDATA

SQL_API_SQLGETDESCFIELD

SQL_API_SQLGETDESCREC

SQL_API_SQLGETDIAGFIELD

SQL_API_SQLGETDIAGREC

SQL_API_SQLGETENVATTR

SQL_API_SQLGETFUNCTIONS

SQL_API_SQLGETINFO

SQL_API_SQLGETSTMTATTR

SQL_API_SQLGETSTMTOPTION

SQL_API_SQLGETTYPEINFO

SQL_API_SQLMORERESULTS

SQL_API_SQLNATIVESQL

SQL_API_SQLNUMPARAMS

SQL_API_SQLNUMRESULTCOLS

SQL_API_SQLPARAMDATA

SQL_API_SQLPARAMOPTIONS

SQL_API_SQLPREPARE

SQL_API_SQLPRIMARYKEYS

SQL_API_SQLPROCEDURECOLUMNS

SQL_API_SQLPROCEDURES

SQL_API_SQLPUTDATA

SQL_API_SQLROWCOUNT

SQL_API_SQLSETCONNECTATTR

SQL_API_SQLSETCONNECTOPTION

SQL_API_SQLSETCURSORNAME

SQL_API_SQLSETDESCFIELD

SQL_API_SQLSETDESCREC

SQL_API_SQLSETENVATTR

SQL_API_SQLSETPARAM

SQL_API_SQLSETPOS

SQL_API_SQLSETSCROLLOPTIONS

SQL_API_SQLSETSTMTATTR

SQL_API_SQLSETSTMTOPTION

SQL_API_SQLSPECIALCOLUMNS

SQL_API_SQLSTATISTICS

SQL_API_SQLTABLEPRIVILEGES

SQL_API_SQLTABLES

SQL_API_SQLTRANSACT

Remarks for SQLGetInfo
SAP MaxDB ODBC Driver: Supported Attributes and Return Values for SQLGetInfo

Attribute

Return Values

SQL_ACCESSIBLE_PROCEDURES

rgbInfoValue = "N"

SQL_ACCESSIBLE_TABLES

rgbInfoValue = "N"

SQL_ACTIVE_CONNECTIONS

rgbInfoValue = 0

SQL_ACTIVE_STATEMENTS

rgbInfoValue = 32767

SQL_ALTER_TABLE

rgbInfoValue = SQL_AT_ADD_COLUMN | SQL_AT_DROP_COLUMN | SQL_AT_ADD_COLUMN_DEFAULT | SQL_AT_ADD_CONSTRAINT | SQL_AT_ADD_TABLE_CONSTRAINT | SQL_AT_DROP_COLUMN_CASCADE | SQL_AT_DROP_COLUMN_DEAFAULT | SQL_AT_SET_COLUMN_DEFAULT

SQL_BOOKMARK_PERSISTENCE

rgbInfoValue = SQL_BP_SCROLL | SQL_BP_UPDATE

SQL_CATALOG_LOCATION

rgbInfoValue = 1 (SQL_CL_START)

SQL_CATALOG_NAME_SEPARATOR

rgbInfoValue = "."

SQL_CATALOG_TERM

rgbInfoValue = "Qualifier"

SQL_CATALOG_USAGE

rgbInfoValue = 0x00000000

SQL_COLUMN_ALIAS

rgbInfoValue = "Y"

SQL_CONCAT_NULL_BEHAVIOR

rgbInfoValue = 0 (SQL_CB_NULL)

SQL_CONVERT_BIGINT

-

SQL_CONVERT_BINARY

-

SQL_CONVERT_BIT

-

SQL_CONVERT_CHAR

-

SQL_CONVERT_DATE

-

SQL_CONVERT_DECIMAL

-

SQL_CONVERT_DOUBLE

-

SQL_CONVERT_FLOAT

-

SQL_CONVERT_FUNCTIONS

rgbInfoValue = 0x00000000L

SQL_CONVERT_INTEGER

-

SQL_CONVERT_LONGVARBINARY

rgbInfoValue = 0x00000000L

SQL_CONVERT_LONGVARCHAR

-

SQL_CONVERT_NUMERIC

-

SQL_CONVERT_REAL

-

SQL_CONVERT_SMALLINT

-

SQL_CONVERT_TIME

-

SQL_CONVERT_TIMESTAMP

-

SQL_CONVERT_TINYINT

-

SQL_CONVERT_VARBINARY

-

SQL_CONVERT_VARCHAR

-

SQL_CORRELATION_NAME

rgbInfoValue = 2 (SQL_CN_ANY)

SQL_CURSOR_COMMIT_BEHAVIOR

rgbInfoValue = SQL_CB_PRESERVE

| SQL_CB_DELETED (SQLMode = ANSI)

SQL_CURSOR_ROLLBACK_BEHAVIOR

rgbInfoValue = SQL_CB_PRESERVE

| SQL_CB_DELETED (SQLMode = ANSI)

SQL_DATA_SOURCE_NAME

rgbInfoValue = (Name of the opened data source)

SQL_DATA_SOURCE_READ_ONLY

rgbInfoValue = "N"

SQL_DBMS_NAME

rgbInfoValue = "MaxDB"

SQL_DBMS_VER

rgbInfoValue = "07.06.nnn"

SQL_DEFAULT_TXN_ISOLATION

rgbInfoValue = SQL_TXN_READ_COMMITTED

SQL_DRIVER_HDBC

rgbInfoValue = (Handle of the driver logon)

SQL_DRIVER_HENV

rgbInfoValue = (Handle of the driver environment)

SQL_DRIVER_HLIB

rgbInfoValue = (Handle of the library)

SQL_DRIVER_HSTMT

rgbInfoValue = (Handle of the driver statement)

SQL_DRIVER_NAME

rgbInfoValue = "sdbodbc.dll", "libsdbodbc.so" (Unix)

SQL_DRIVER_ODBC_VER

rgbInfoValue = "03.51"

SQL_DRIVER_ODBC_VER

rgbInfoValue = (Version of the driver manager > 3.51)

SQL_DRIVER_VER

rgbInfoValue = "7.<minor_version>.<correction_level>b<build_number>"

SQL_EXPRESSIONS_IN_ORDERBY

rgbInfoValue = "N"

SQL_FETCH_DIRECTION

rgbInfoValue = SQL_FD_FETCH_NEXT | SQL_FD_FETCH_FIRST | SQL_FD_FETCH_LAST | SQL_FD_FETCH_PRIOR | SQL_FD_FETCH_ABSOLUTE | SQL_FD_FETCH_RELATIVE | SQL_FD_FETCH_BOOKMARK

SQL_FILE_USAGE

rgbInfoValue = 0 (SQL_FILE_NOT_SUPPORTED)

SQL_GETDATA_EXTENSIONS

rgbInfoValue = SQL_GD_ANY_COLUMN | SQL_GD_ANY_ORDER | SQL_GD_ANY_BOUND | SQL_GD_ANY_BLOCK

SQL_GROUP_BY

rgbInfoValue = SQL_GB_GROUP_BY_CONTAINS_SELECT

SQL_IDENTIFIER_CASE

rgbInfoValue = 1 (SQL_IC_UPPER)

SQL_IDENTIFIER_QUOTE_CHAR

rgbInfoValue = "\""

SQL_INTEGRITY

rgbInfoValue = "N"

SQL_KEYWORDS

rgbInfoValue = (List of key words, depends on SQLMode)

SQL_LIKE_ESCAPE_CLAUSE

rgbInfoValue = "Y"

SQL_LOCK_TYPES

rgbInfoValue = 1 SQL_LCK_NO_CHANGE

SQL_MAX_BINARY_LITERAL_LEN

rgbInfoValue = 0

SQL_MAX_CATALOG_NAME_LEN

rgbInfoValue = 0

SQL_MAX_CHAR_LITERAL_LEN

rgbInfoValue = 0

SQL_MAX_COLUMN_NAME_LEN

rgbInfoValue = 32

SQL_MAX_COLUMNS_IN_GROUP_BY

rgbInfoValue = 128

SQL_MAX_COLUMNS_IN_INDEX

rgbInfoValue = 16

SQL_MAX_COLUMNS_IN_ORDER_BY

rgbInfoValue = 128

SQL_MAX_COLUMNS_IN_SELECT

rgbInfoValue = 1023

SQL_MAX_COLUMNS_IN_TABLE

rgbInfoValue = 1023

SQL_MAX_CONCURRENT_ACTIVITIES

rgbInfoValue = 32767

SQL_MAX_CURSOR_NAME_LEN

rgbInfoValue = 32

SQL_MAX_DRIVER_CONNECTIONS

rgbInfoValue = 0

SQL_MAX_INDEX_SIZE

rgbInfoValue = 1024

SQL_MAX_OWNER_NAME_LEN

rgbInfoValue = 32

SQL_MAX_PROCEDURE_NAME_LEN

rgbInfoValue = 32

SQL_MAX_QUALIFIER_NAME_LEN

rgbInfoValue = 0

SQL_MAX_ROW_SIZE

rgbInfoValue = 0

SQL_MAX_ROW_SIZE_INCLUDES_LONG

rgbInfoValue = "N"

SQL_MAX_SCHEMA_NAME_LEN

rgbInfoValue = 32

SQL_MAX_STATEMENT_LEN

rgbInfoValue = 0

SQL_MAX_TABLE_NAME_LEN

rgbInfoValue = 32

SQL_MAX_TABLES_IN_SELECT

rgbInfoValue = 64

SQL_MAX_USER_NAME_LEN

rgbInfoValue = 32

SQL_MULT_RESULT_SETS

rgbInfoValue = "N"

SQL_MULTIPLE_ACTIVE_TXN

rgbInfoValue = "Y"

SQL_NEED_LONG_DATA_LEN

rgbInfoValue = "N"

SQL_NON_NULLABLE_COLUMN

rgbInfoValue = 1 (SQL_NNC_NON_NULL)

SQL_NULL_COLLATION

rgbInfoValue = 1 (SQL_NC_LOW)

SQL_NUMERIC_FUNCTIONS

rgbInfoValue = SQL_FN_NUM_ABS | SQL_FN_NUM_ACOS | SQL_FN_NUM_ASIN | SQL_FN_NUM_ATAN | SQL_FN_NUM_ATAN2 | SQL_FN_NUM_CEILING | SQL_FN_NUM_COS | SQL_FN_NUM_COT | SQL_FN_NUM_EXP | SQL_FN_NUM_FLOOR | SQL_FN_NUM_LOG | SQL_FN_NUM_MOD | SQL_FN_NUM_SIGN | SQL_FN_NUM_SIN | SQL_FN_NUM_SQRT | SQL_FN_NUM_TAN | SQL_FN_NUM_PI | SQL_FN_NUM_DEGREES | SQL_FN_NUM_RADIANS | SQL_FN_NUM_ROUND

SQL_ODBC_API_CONFORMANCE

rgbInfoValue = 2 (SQL_OAC_LEVEL2)

SQL_ODBC_SAG_CLI_CONFORMANCE

rgbInfoValue = 1 (SQL_OSCC_COMPLIANT)

SQL_ODBC_SQL_CONFORMANCE

rgbInfoValue = 2 (SQL_OSC_EXTENDED)

SQL_ODBC_SQL_OPT_IEF

rgbInfoValue = "N"

SQL_ODBC_VER

rgbInfoValue = "03.520000"

SQL_ORDER_BY_COLUMNS_IN_SELECT

rgbInfoValue = "N"

SQL_OUTER_JOINS

rgbInfoValue = "Y"

SQL_OWNER_TERM

rgbInfoValue = "Schema"

SQL_OWNER_USAGE

rgbInfoValue = SQL_OU_DML_STATEMENTS | SQL_OU_PROCEDURE_INVOCATION | SQL_OU_TABLE_DEFINITION | SQL_OU_INDEX_DEFINITION | SQL_OU_PRIVILEGE_DEFINITION

SQL_POS_OPERATIONS

rgbInfoValue = SQL_POS_UPDATE | SQL_POS_DELETE | SQL_POS_ADD (permitted with dynamic cursors only) | SQL_POS_POSITION | SQL_POS_REFRESH

SQL_POSITIONED_STATEMENTS

rgbInfoValue = rgbInfoValue = SQL_PS_POSITIONED_DELETE | SQL_PS_POSITIONED_UPDATE | SQL_PS_SELECT_FOR_UPDATE

SQL_PROCEDURE_TERM

rgbInfoValue = "stored procedure"

SQL_PROCEDURES

rgbInfoValue = "Y"

SQL_QUALIFIER_LOCATION

rgbInfoValue = 1 (SQL_CL_START)

SQL_QUALIFIER_NAME_SEPARATOR

rgbInfoValue = "."

SQL_QUALIFIER_TERM

rgbInfoValue = "Qualifier"

SQL_QUALIFIER_USAGE

rgbInfoValue = 0x00000000

SQL_QUOTED_IDENTIFIER_CASE

rgbInfoValue = 3 (SQL_IC_SENSITIVE)

SQL_ROW_UPDATES

rgbInfoValue = "Y"

SQL_SCHEMA_TERM

rgbInfoValue = "Schema"

SQL_SCHEMA_USAGE

rgbInfoValue = SQL_OU_DML_STATEMENTS | SQL_OU_PROCEDURE_INVOCATION | SQL_OU_TABLE_DEFINITION | SQL_OU_INDEX_DEFINITION | SQL_OU_PRIVILEGE_DEFINITION

SQL_SCROLL_CONCURRENCY

rgbInfoValue = SQL_SCCO_READ_ONLY | SQL_SCCO_LOCK | SQL_SCCO_OPT_ROWVER | SQL_SCCO_OPT_VALUES

SQL_SCROLL_OPTIONS

rgbInfoValue = SQL_SO_FORWARD_ONLY | SQL_SO_KEYSET_DRIVEN | SQL_SO_DYNAMIC | SQL_SO_STATIC

SQL_SEARCH_PATTERN_ESCAPE

rgbInfoValue = "\"

SQL_SERVER_NAME

rgbInfoValue = (Name of the database computer)

SQL_SPECIAL_CHARACTERS

rgbInfoValue = "#@$"

SQL_STATIC_SENSITIVITY

rgbInfoValue = 0x00000000

SQL_STRING_FUNCTIONS

rgbInfoValue = SQL_FN_STR_LEFT | SQL_FN_STR_LTRIM | SQL_FN_STR_LENGTH | SQL_FN_STR_LCASE | SQL_FN_STR_REPLACE | SQL_FN_STR_RIGHT | SQL_FN_STR_RTRIM | SQL_FN_STR_SUBSTRING | SQL_FN_STR_UCASE | SQL_FN_STR_SOUNDEX

SQL_SUBQUERIES

rgbInfoValue = SQL_SQ_COMPARISON | SQL_SQ_EXISTS | SQL_SQ_IN | SQL_SQ_CORRELATED_SUBQUERIES

SQL_SYSTEM_FUNCTIONS

rgbInfoValue = SQL_FN_SYS_USERNAME | SQL_FN_SYS_DBNAME | SQL_FN_SYS_IFNULL

SQL_TABLE_TERM

rgbInfoValue = "Table"

SQL_TIMEDATE_ADD_INTERVALS

rgbInfoValue = 0x00000000

SQL_TIMEDATE_DIFF_INTERVALS

rgbInfoValue = 0x00000000

SQL_TIMEDATE_FUNCTIONS

rgbInfoValue = SQL_FN_TD_NOW | SQL_FN_TD_CURDATE | SQL_FN_TD_DAYOFMONTH | SQL_FN_TD_DAYOFWEEK | SQL_FN_TD_DAYOFYEAR | SQL_FN_TD_MONTH | SQL_FN_TD_WEEK | SQL_FN_TD_YEAR | SQL_FN_TD_CURTIME | SQL_FN_TD_HOUR | SQL_FN_TD_MINUTE | SQL_FN_TD_SECOND | SQL_FN_TD_DAYNAME | SQL_FN_TD_MONTHNAME

SQL_TXN_CAPABLE

rgbInfoValue = 2 (SQL_TC_ALL)

SQL_TXN_ISOLATION_OPTION

rgbInfoValue = SQL_TXN_READ_UNCOMMITTED | SQL_TXN_READ_COMMITTED | SQL_TXN_REPEATABLE_READ | SQL_TXN_SERIALIZABLE

SQL_UNION

rgbInfoValue = SQL_U_UNION | SQL_U_UNION_ALL

SQL_USER_NAME

rgbInfoValue = (Name of the active user)