ODBC utility
[ODBC API]

Functions called within ODBC driver. More...

Defines

#define C_TYPES
#define SQL_TYPES
#define TYPE_NORMAL_SQL_C_GUID
#define TYPE_NORMAL_SQL_GUID

Functions

int odbc_c_to_server_type (int c_type)
 Pass this an SQL_C_* type and get a SYB* type which most closely corresponds to the SQL_C_* type.
SQLSMALLINT odbc_get_concise_c_type (SQLSMALLINT type, SQLSMALLINT interval)
SQLSMALLINT odbc_get_concise_sql_type (SQLSMALLINT type, SQLSMALLINT interval)
SQLLEN odbc_get_octet_len (int c_type, const struct _drecord *drec)
SQLINTEGER odbc_get_param_len (const struct _drecord *drec_axd, const struct _drecord *drec_ixd, const TDS_DESC *axd, unsigned int n_row)
 Return length of parameter from parameter information.
int odbc_get_string_size (int size, SQLCHAR *str)
void odbc_rdbms_version (TDSSOCKET *tds, char *pversion_string)
 Returns the version of the RDBMS in the ODBC format.
SQLSMALLINT odbc_server_to_sql_type (int col_type, int col_size)
 Convert type from database to ODBC.
SQLRETURN odbc_set_concise_c_type (SQLSMALLINT concise_type, struct _drecord *drec, int check_only)
 Set concise type and all cascading field.
SQLRETURN odbc_set_concise_sql_type (SQLSMALLINT concise_type, struct _drecord *drec, int check_only)
 Set concise type and all cascading field.
void odbc_set_return_params (struct _hstmt *stmt, unsigned int n_row)
void odbc_set_return_status (struct _hstmt *stmt, unsigned int n_row)
void odbc_set_sql_type_info (TDSCOLUMN *col, struct _drecord *drec, SQLINTEGER odbc_ver)
static int odbc_set_stmt (TDS_STMT *stmt, char **dest, const char *sql, int sql_len)
int odbc_set_stmt_prepared_query (TDS_STMT *stmt, const char *sql, int sql_len)
int odbc_set_stmt_query (TDS_STMT *stmt, const char *sql, int sql_len)
SQLRETURN odbc_set_string (SQLPOINTER buffer, SQLSMALLINT cbBuffer, SQLSMALLINT FAR *pcbBuffer, const char *s, int len)
 Copy a string to client setting size according to ODBC convenction.
SQLRETURN odbc_set_string_i (SQLPOINTER buffer, SQLINTEGER cbBuffer, SQLINTEGER FAR *pcbBuffer, const char *s, int len)
int odbc_sql_to_c_type_default (int sql_type)
SQLINTEGER odbc_sql_to_displaysize (int sqltype, TDSCOLUMN *col)
int odbc_sql_to_server_type (TDSSOCKET *tds, int sql_type)

Detailed Description

Functions called within ODBC driver.


Define Documentation

#define SQL_TYPES
Value:
TYPE_NORMAL(SQL_BIT) \
        TYPE_NORMAL(SQL_SMALLINT) \
        TYPE_NORMAL(SQL_TINYINT) \
        TYPE_NORMAL(SQL_INTEGER) \
        TYPE_NORMAL(SQL_BIGINT) \
\
        TYPE_NORMAL_SQL_GUID \
\
        TYPE_NORMAL(SQL_BINARY) \
        TYPE_NORMAL(SQL_VARBINARY) \
        TYPE_NORMAL(SQL_LONGVARBINARY) \
\
        TYPE_NORMAL(SQL_CHAR) \
        TYPE_NORMAL(SQL_VARCHAR) \
        TYPE_NORMAL(SQL_LONGVARCHAR) \
\
        TYPE_NORMAL(SQL_DECIMAL) \
        TYPE_NORMAL(SQL_NUMERIC) \
\
        TYPE_NORMAL(SQL_FLOAT) \
        TYPE_NORMAL(SQL_REAL) \
        TYPE_NORMAL(SQL_DOUBLE)\
\
        TYPE_VERBOSE_START(SQL_DATETIME) \
        TYPE_VERBOSE_DATE(SQL_DATETIME, SQL_CODE_TIMESTAMP, SQL_TYPE_TIMESTAMP, SQL_TIMESTAMP) \
        TYPE_VERBOSE_END(SQL_DATETIME)

Function Documentation

SQLRETURN odbc_set_concise_c_type ( SQLSMALLINT  concise_type,
struct _drecord drec,
int  check_only 
)

Set concise type and all cascading field.

Parameters:
concise_type concise type to set
drec record to set. NULL to test error without setting
check_only it <>0 (true) check only, do not set type
SQLRETURN odbc_set_concise_sql_type ( SQLSMALLINT  concise_type,
struct _drecord drec,
int  check_only 
)

Set concise type and all cascading field.

Parameters:
concise_type concise type to set
drec record to set. NULL to test error without setting
check_only it <>0 (true) check only, do not set type
SQLRETURN odbc_set_string ( SQLPOINTER  buffer,
SQLSMALLINT  cbBuffer,
SQLSMALLINT FAR *  pcbBuffer,
const char *  s,
int  len 
)

Copy a string to client setting size according to ODBC convenction.

Parameters:
buffer client buffer
cbBuffer client buffer size (in bytes)
pcbBuffer pointer to SQLSMALLINT to hold string size
s string to copy
len len of string to copy. <0 null terminated
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Generated on Sun Mar 6 18:25:39 2011 for FreeTDS API by  doxygen 1.6.3