RDM SQL CLI API Reference
Collaboration diagram for RDM SQL CLI API Reference:

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 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:

    -lrdmrdbc

.

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_SUCCESSFunction completed successfully.
SQL_SUCCESS_WITH_INFOFunction completed successfully, with a nonfatal status information. Use the SQLGetDiagRec() function to retrieve the additional information.
SQL_INVALID_HANDLEFunction failed because an invalid environment, connection, statement, or descriptor handle was provided as an argument.
SQL_ERRORFunction 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, or SQL_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]HandleTypeType of handle to be allocated
[in]InputHandleAllocated input handle in whose context new handle will be allocated
[out]OutputHandlePointer to buffer to contain allocated handle structure
Examples
c-odbc/01_helloworld_odbc/odbc01Example_main.c, tfsrdbc/rdbcTfsAlloc.c, and tfsrdbc/rdbcTfsAllocDefault.c.

◆ 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 
)

#include <sqlext.h>

Perform bulk update opertations.

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

◆ SQLColumnPrivileges()

RDBC_EXPORT SQLRETURN SQLColumnPrivileges ( SQLHSTMT  hstmt,
SQLCHAR szCatalogName,
SQLSMALLINT  cbCatalogName,
SQLCHAR szSchemaName,
SQLSMALLINT  cbSchemaName,
SQLCHAR szTableName,
SQLSMALLINT  cbTableName,
SQLCHAR szColumnName,
SQLSMALLINT  cbColumnName 
)

#include <sqlext.h>

Return a list of column privileges for a table.

RDM 14.2 does not support column privileges. This function will always return an empty result set.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ SQLSetPos()

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

#include <sqlext.h>

Set the cursor position in a result set.

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

◆ SQLTablePrivileges()

RDBC_EXPORT SQLRETURN SQLTablePrivileges ( SQLHSTMT  hstmt,
SQLCHAR szCatalogName,
SQLSMALLINT  cbCatalogName,
SQLCHAR szSchemaName,
SQLSMALLINT  cbSchemaName,
SQLCHAR szTableName,
SQLSMALLINT  cbTableName 
)

#include <sqlext.h>

Return a list of table privileges for the data source.

RDM 14.2 does not support table privileges. This function will always return an empty result set.