NCBI C++ ToolKit
|
#include <config.h>
#include <stdarg.h>
#include <stdio.h>
#include <assert.h>
#include <ctype.h>
#include <freetds/odbc.h>
#include <freetds/iconv.h>
#include <freetds/string.h>
#include <freetds/convert.h>
#include "replacements.h"
#include "sqlwparams.h"
#include <odbcss.h>
#include "odbc_export.h"
Go to the source code of this file.
Go to the SVN repository for this file.
Macros | |
#define | TDSODBC_BCP |
#define | SQLSetConnectAttr(h, n, p, t) _SQLSetConnectAttr(h, n, p, t _wide0) |
#define | IRD_CHECK |
#define | INIT_HANDLE(t, n) |
#define | ODBC_ENTER_HSTMT INIT_HANDLE(STMT, stmt) |
#define | ODBC_ENTER_HDBC INIT_HANDLE(DBC, dbc) |
#define | ODBC_ENTER_HENV INIT_HANDLE(ENV, env) |
#define | ODBC_ENTER_HDESC INIT_HANDLE(DESC, desc) |
#define | IS_VALID_LEN(len) ((len) >= 0 || (len) == SQL_NTS || (len) == SQL_NULL_DATA) |
#define | ODBC_SAFE_ERROR(stmt) |
#define | DEFAULT_QUERY_TIMEOUT (~((SQLUINTEGER) 0)) |
#define | ODBC_PRRET_BUF char unknown_prret_buf[24] |
#define | odbc_prret(ret) odbc_prret(ret, unknown_prret_buf, sizeof(unknown_prret_buf)) |
#define | IRD_UPDATE(desc, errs, exit) |
#define | COUT(src) result = odbc_set_string_oct(stmt->dbc, rgbDesc, cbDescMax, pcbDesc, src ? src : "", -1); |
#define | SOUT(src) result = odbc_set_string_oct(stmt->dbc, rgbDesc, cbDescMax, pcbDesc, tds_dstr_cstr(&src), -1); |
#define | IOUT(type, src) *pfDesc = src |
#define | DESC_SET_NEED_REPREPARE |
#define | COUT(src) result = odbc_set_string_oct(desc_get_dbc(desc), Value, BufferLength, StringLength, src, -1); |
#define | SOUT(src) result = odbc_set_string_oct(desc_get_dbc(desc), Value, BufferLength, StringLength, tds_dstr_cstr(&src), -1); |
#define | IOUT(type, src) *((type *)Value) = src |
#define | IIN(type, dest) dest = (type)(TDS_INTPTR)Value |
#define | PIN(type, dest) dest = (type)Value |
#define | AT_ROW(ptr, type) (row_offset ? (type*)(((char*)(ptr)) + row_offset) : &ptr[curr_row]) |
#define | API_X(n) if (n >= 0 && n < 100) pfExists[n] = SQL_TRUE; |
#define | API__(n) |
#define | API3X(n) |
#define | API3_(n) |
#define | API_X(n) case n: |
#define | API__(n) |
#define | API3X(n) |
#define | API3_(n) |
#define | SIVAL out_len = sizeof(SQLSMALLINT), *((SQLSMALLINT *) rgbInfoValue) |
#define | USIVAL out_len = sizeof(SQLUSMALLINT), *((SQLUSMALLINT *) rgbInfoValue) |
#define | IVAL out_len = sizeof(SQLINTEGER), *((SQLINTEGER *) rgbInfoValue) |
#define | UIVAL out_len = sizeof(SQLUINTEGER), *((SQLUINTEGER *) rgbInfoValue) |
#define | ULVAL out_len = sizeof(SQLULEN), *((SQLULEN *) rgbInfoValue) |
#define API3_ | ( | n | ) |
#define API3_ | ( | n | ) |
#define API3X | ( | n | ) |
#define API3X | ( | n | ) |
#define API__ | ( | n | ) |
#define API__ | ( | n | ) |
#define API_X | ( | n | ) | case n: |
#define COUT | ( | src | ) | result = odbc_set_string_oct(stmt->dbc, rgbDesc, cbDescMax, pcbDesc, src ? src : "", -1); |
#define COUT | ( | src | ) | result = odbc_set_string_oct(desc_get_dbc(desc), Value, BufferLength, StringLength, src, -1); |
#define DEFAULT_QUERY_TIMEOUT (~((SQLUINTEGER) 0)) |
#define DESC_SET_NEED_REPREPARE |
#define IIN | ( | type, | |
dest | |||
) | dest = (type)(TDS_INTPTR)Value |
#define IOUT | ( | type, | |
src | |||
) | *pfDesc = src |
#define IRD_UPDATE | ( | desc, | |
errs, | |||
exit | |||
) |
#define IVAL out_len = sizeof(SQLINTEGER), *((SQLINTEGER *) rgbInfoValue) |
#define ODBC_ENTER_HDBC INIT_HANDLE(DBC, dbc) |
#define ODBC_ENTER_HDESC INIT_HANDLE(DESC, desc) |
#define ODBC_ENTER_HENV INIT_HANDLE(ENV, env) |
#define ODBC_ENTER_HSTMT INIT_HANDLE(STMT, stmt) |
#define odbc_prret | ( | ret | ) | odbc_prret(ret, unknown_prret_buf, sizeof(unknown_prret_buf)) |
#define ODBC_SAFE_ERROR | ( | stmt | ) |
#define SIVAL out_len = sizeof(SQLSMALLINT), *((SQLSMALLINT *) rgbInfoValue) |
#define SOUT | ( | src | ) | result = odbc_set_string_oct(stmt->dbc, rgbDesc, cbDescMax, pcbDesc, tds_dstr_cstr(&src), -1); |
#define SOUT | ( | src | ) | result = odbc_set_string_oct(desc_get_dbc(desc), Value, BufferLength, StringLength, tds_dstr_cstr(&src), -1); |
#define UIVAL out_len = sizeof(SQLUINTEGER), *((SQLUINTEGER *) rgbInfoValue) |
#define USIVAL out_len = sizeof(SQLUSMALLINT), *((SQLUSMALLINT *) rgbInfoValue) |
Definition at line 1544 of file odbc.c.
References dbc, env, NULL, ODBC_ENTER_HENV, odbc_errs_add(), ODBC_EXIT_, SQL_ASYNC_ENABLE_OFF, SQL_AUTOCOMMIT_ON, SQL_CD_TRUE, SQL_CUR_USE_IF_NEEDED, SQL_CURSOR_FORWARD_ONLY, SQL_FALSE, SQL_HANDLE_DBC, SQL_MARS_ENABLED_NO, SQL_MODE_READ_WRITE, SQL_OPT_TRACE_OFF, SQL_TXN_READ_COMMITTED, TDS_DBG_FUNC, tds_dstr_init(), tds_mutex_init, tds_new0, and tdsdump_log.
Referenced by SQLAllocConnect().
Definition at line 1654 of file odbc.c.
References dbc, desc_alloc(), DESC_ARD, i, NULL, ODBC_ENTER_HDBC, odbc_errs_add(), ODBC_EXIT_, SQL_DESC_ALLOC_USER, TDS_DBG_FUNC, TDS_MAX_APP_DESC, and tdsdump_log.
|
static |
Definition at line 1609 of file odbc.c.
References ctx, env, free(), odbc_errmsg_handler(), SQL_ERROR, SQL_HANDLE_ENV, SQL_SUCCESS, SQL_TRUE, strdup, tds_alloc_context, TDS_DBG_FUNC, tds_mutex_init, tds_new0, and tdsdump_log.
Referenced by SQLAllocEnv().
Definition at line 1682 of file odbc.c.
References _SQLSetStmtAttr(), _wide0, asprintf, assert, dbc, DEFAULT_QUERY_TIMEOUT, desc_alloc(), DESC_APD, DESC_ARD, desc_free(), DESC_IPD, DESC_IRD, free(), NOT_IN_ROW, NULL, ODBC_ENTER_HDBC, odbc_errs_add(), ODBC_EXIT_, SQL_ASYNC_ENABLE_OFF, SQL_BIND_BY_COLUMN, SQL_CONCUR_READ_ONLY, SQL_CURSOR_FORWARD_ONLY, SQL_CURSOR_TYPE, SQL_DESC_ALLOC_AUTO, SQL_FALSE, SQL_HANDLE_STMT, SQL_INSENSITIVE, SQL_IS_INTEGER, SQL_NONSCROLLABLE, SQL_NOSCAN_OFF, SQL_PARAM_BIND_BY_COLUMN, SQL_RD_ON, SQL_SC_NON_UNIQUE, SQL_UB_OFF, stmt, TDS_DBG_FUNC, tds_dstr_free(), tds_dstr_init(), tds_dstr_set(), tds_mutex_init, tds_new0, TDS_NO_COUNT, and tdsdump_log.
Referenced by SQLAllocStmt().
|
static |
Definition at line 1385 of file odbc.c.
References desc_alloc_records(), _hdesc::header, is_numeric(), NULL, ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT_, odbc_set_concise_c_type(), odbc_set_concise_sql_type(), _hdesc::records, SQL_C_BINARY, SQL_C_CHAR, SQL_C_WCHAR, SQL_DECIMAL, _dheader::sql_desc_count, _drecord::sql_desc_data_ptr, _drecord::sql_desc_indicator_ptr, _drecord::sql_desc_length, _drecord::sql_desc_octet_length, _drecord::sql_desc_octet_length_ptr, _drecord::sql_desc_parameter_type, _drecord::sql_desc_precision, _drecord::sql_desc_scale, _drecord::sql_desc_type, SQL_NUMERIC, SQL_PARAM_INPUT, SQL_PARAM_INPUT_OUTPUT, SQL_PARAM_OUTPUT, SQL_SUCCESS, SQLULEN, stmt, TDS_DBG_FUNC, and tdsdump_log.
Referenced by SQLBindParam(), SQLBindParameter(), and SQLSetParam().
|
static |
Definition at line 2047 of file odbc.c.
References COUT, _hdesc::header, IOUT, IRD_UPDATE, NULL, ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT, ODBC_EXIT_, _hdesc::records, result, SOUT, SQL_COLUMN_COUNT, SQL_COLUMN_LENGTH, SQL_COLUMN_NAME, SQL_COLUMN_NULLABLE, SQL_COLUMN_PRECISION, SQL_COLUMN_SCALE, SQL_COLUMN_TYPE, SQL_DATE, SQL_DECIMAL, _drecord::sql_desc_auto_unique_value, SQL_DESC_AUTO_UNIQUE_VALUE, _drecord::sql_desc_base_column_name, SQL_DESC_BASE_COLUMN_NAME, _drecord::sql_desc_base_table_name, SQL_DESC_BASE_TABLE_NAME, _drecord::sql_desc_case_sensitive, SQL_DESC_CASE_SENSITIVE, _drecord::sql_desc_catalog_name, SQL_DESC_CATALOG_NAME, _drecord::sql_desc_concise_type, SQL_DESC_CONCISE_TYPE, _dheader::sql_desc_count, SQL_DESC_COUNT, _drecord::sql_desc_display_size, SQL_DESC_DISPLAY_SIZE, _drecord::sql_desc_fixed_prec_scale, SQL_DESC_FIXED_PREC_SCALE, _drecord::sql_desc_label, SQL_DESC_LABEL, _drecord::sql_desc_length, SQL_DESC_LENGTH, _drecord::sql_desc_literal_prefix, SQL_DESC_LITERAL_PREFIX, _drecord::sql_desc_literal_suffix, SQL_DESC_LITERAL_SUFFIX, _drecord::sql_desc_local_type_name, SQL_DESC_LOCAL_TYPE_NAME, _drecord::sql_desc_name, SQL_DESC_NAME, _drecord::sql_desc_nullable, SQL_DESC_NULLABLE, _drecord::sql_desc_num_prec_radix, SQL_DESC_NUM_PREC_RADIX, _drecord::sql_desc_octet_length, SQL_DESC_OCTET_LENGTH, _drecord::sql_desc_precision, SQL_DESC_PRECISION, _drecord::sql_desc_scale, SQL_DESC_SCALE, _drecord::sql_desc_schema_name, SQL_DESC_SCHEMA_NAME, _drecord::sql_desc_searchable, SQL_DESC_SEARCHABLE, _drecord::sql_desc_table_name, SQL_DESC_TABLE_NAME, _drecord::sql_desc_type, SQL_DESC_TYPE, _drecord::sql_desc_type_name, SQL_DESC_TYPE_NAME, _drecord::sql_desc_unnamed, SQL_DESC_UNNAMED, _drecord::sql_desc_unsigned, SQL_DESC_UNSIGNED, _drecord::sql_desc_updatable, SQL_DESC_UPDATABLE, SQL_DOUBLE, SQL_ERROR, SQL_FLOAT, SQL_NUMERIC, SQL_OV_ODBC3, SQL_REAL, SQL_SS_TIME2, SQL_SS_TIMESTAMPOFFSET, SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_TIME, SQL_TIMESTAMP, SQL_TYPE_DATE, SQL_TYPE_TIME, SQL_TYPE_TIMESTAMP, SQLLEN, SQLULEN, stmt, TDS_DBG_FUNC, TDS_DBG_INFO1, TDS_DBG_INFO2, and tdsdump_log.
Referenced by SQLColAttributes().
|
static |
Definition at line 663 of file odbc.c.
References _wide, odbc_col_setname(), ODBC_ENTER_HSTMT, ODBC_EXIT_, odbc_stat_execute(), SQL_OV_ODBC3, SQL_SUCCEEDED, and stmt.
Referenced by SQLColumnPrivileges().
|
static |
SQLColumns.
Return column information for a table or view. This is mapped to a call to sp_columns which - lucky for us - returns the exact result set we need.
exec sp_columns [ @table_name = ] object [ , [ @table_owner = ] owner ] [ , [ @table_qualifier = ] qualifier ] [ , [ @column_name = ] column ] [ , [ @ODBCVer = ] ODBCVer ]
Definition at line 4768 of file odbc.c.
References _wide, NULL, odbc_col_setname(), ODBC_ENTER_HSTMT, ODBC_EXIT_, ODBC_SPECIAL_COLUMNS, odbc_stat_execute(), SQL_OV_ODBC3, SQL_SUCCEEDED, stmt, TDS_IS_MSSQL, and TDS_IS_SYBASE.
Referenced by SQLColumns().
|
static |
Definition at line 1918 of file odbc.c.
References _wide, tds_login::database, dbc, IS_VALID_LEN, login, NULL, odbc_connect(), odbc_dstr_copy(), ODBC_ENTER_HDBC, odbc_errs_add(), ODBC_EXIT_, odbc_get_dsn_info(), odbc_get_string_size(), tds_login::password, tds_alloc_login, tds_dstr_copy(), tds_dstr_cstr(), tds_dstr_dup(), tds_dstr_isempty(), tds_free_login, tds_init_login, and tds_login::user_name.
Referenced by SQLConnect().
|
static |
Definition at line 1994 of file odbc.c.
References _hdesc::header, IRD_UPDATE, NULL, ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT, ODBC_EXIT_, odbc_set_string, _hdesc::records, result, SQL_DECIMAL, _drecord::sql_desc_concise_type, _dheader::sql_desc_count, _drecord::sql_desc_label, _drecord::sql_desc_length, _drecord::sql_desc_nullable, _drecord::sql_desc_precision, _drecord::sql_desc_scale, _drecord::sql_desc_type, SQL_ERROR, SQL_NUMERIC, SQL_SUCCESS_WITH_INFO, stmt, and tds_dstr_cstr().
Referenced by SQLDescribeCol().
|
static |
Definition at line 540 of file odbc.c.
References tds_login::database, dbc, DSTR_INITIALIZER, free(), get_login_info(), IS_VALID_LEN, TDS_PARSED_PARAM::len, login, NULL, odbc_connect(), odbc_dstr_copy(), ODBC_ENTER_HDBC, odbc_errs_add(), ODBC_EXIT_, ODBC_PARAM_PWD, ODBC_PARAM_SIZE, ODBC_PARAM_Trusted_Connection, ODBC_PARAM_UID, odbc_parse_connect_string(), odbc_set_string, out(), TDS_PARSED_PARAM::p, tds_login::password, tds_login::server_name, SQL_DRIVER_COMPLETE, SQL_DRIVER_COMPLETE_REQUIRED, SQL_DRIVER_NOPROMPT, SQL_DRIVER_PROMPT, tds_alloc_login, TDS_DBG_INFO1, tds_dstr_buf(), tds_dstr_cstr(), tds_dstr_dup(), tds_dstr_free(), tds_dstr_isempty(), tds_dstr_len(), tds_free_login, tds_init_login, tdsdump_log, and tds_login::user_name.
Referenced by SQLDriverConnect().
|
static |
Definition at line 3528 of file odbc.c.
References _SQLExecute(), _wide, NULL, ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT, ODBC_EXIT_, odbc_set_stmt_query(), prepare_call(), SQL_SUCCESS, start_parse_prepared_query(), stmt, tds_count_placeholders, and tds_dstr_cstr().
Referenced by SQLExecDirect().
Definition at line 3250 of file odbc.c.
References tds_socket::conn, done, head, IS_TDS71_PLUS, IS_TDS7_PLUS, NULL, odbc_cursor_execute(), odbc_errs_add(), odbc_free_dynamic(), odbc_init_headers(), odbc_lock_statement(), ODBC_MAX, ODBC_MIN, odbc_populate_ird(), odbc_process_tokens(), ODBC_RETURN, ODBC_RETURN_, ODBC_SAFE_ERROR, odbc_skip_rpc_name(), odbc_unlock_statement(), tds_dynamic::params, PRE_NORMAL_ROW, SQL_CONCUR_READ_ONLY, SQL_CURSOR_FORWARD_ONLY, SQL_ERROR, SQL_NO_DATA, SQL_OV_ODBC3, SQL_PARAM_ERROR, SQL_PARAM_SUCCESS, SQL_PARAM_SUCCESS_WITH_INFO, SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, start_parse_prepared_query(), tds_socket::state, stmt, tds, tds71_submit_prepexec, TDS_CMD_DONE, TDS_CMD_FAIL, TDS_COMPUTE_RESULT, TDS_DBG_FUNC, TDS_DBG_INFO1, TDS_DEAD, TDS_DONE_RESULT, TDS_DONEINPROC_RESULT, TDS_DONEPROC_RESULT, tds_dstr_buf(), tds_dstr_cstr(), tds_dstr_isempty(), TDS_FAILED, tds_free_input_params, TDS_IDLE, tds_multiple_done, TDS_MULTIPLE_EXECUTE, tds_multiple_execute, tds_multiple_init, TDS_MULTIPLE_QUERY, tds_multiple_query, TDS_NO_COUNT, tds_process_simple_query, tds_release_dynamic, TDS_ROW_RESULT, TDS_ROWFMT_RESULT, tds_submit_execdirect, tds_submit_execute, tds_submit_prepare, tds_submit_query_params, tds_submit_rpc, TDS_SUCCEED, TDS_TOKEN_RESULTS, tdsdump_log, and tmp.
Referenced by _SQLExecDirect(), _SQLParamData(), odbc_stat_execute(), SQLExecute(), and SQLGetTypeInfo().
|
static |
Definition at line 3723 of file odbc.c.
References AFTER_COMPUTE_ROW, AT_ROW, tds_column::column_cur_size, tds_column::column_data, tds_column::column_size, tds_column::column_text_sqlgetdatapos, tds_column::column_type, tds_result_info::columns, tds_socket::current_results, tds_cursor::cursor_rows, dummy, _hdesc::header, i, if(), IN_COMPUTE_ROW, IN_NORMAL_ROW, IRD_CHECK, len, NOT_IN_ROW, NULL, tds_result_info::num_cols, odbc_errs_add(), odbc_fix_data_type_col(), odbc_get_octet_len(), odbc_lock_statement(), odbc_populate_ird(), odbc_process_tokens(), ODBC_RETURN, ODBC_RETURN_, ODBC_SAFE_ERROR, ODBC_SPECIAL_COLUMNS, ODBC_SPECIAL_GETTYPEINFO, ODBC_SPECIAL_NONE, ODBC_SPECIAL_PROCEDURECOLUMNS, ODBC_SPECIAL_SPECIALCOLUMNS, odbc_sql_to_c_type_default(), odbc_tds2sql(), odbc_unlock_statement(), tds_column::on_server, PRE_NORMAL_ROW, _hdesc::records, tds_socket::rows_affected, SQL_BIND_BY_COLUMN, SQL_C_BINARY, SQL_C_CHAR, SQL_C_DEFAULT, _dheader::sql_desc_array_size, _drecord::sql_desc_concise_type, _dheader::sql_desc_count, _drecord::sql_desc_data_ptr, _drecord::sql_desc_indicator_ptr, _drecord::sql_desc_octet_length, _drecord::sql_desc_octet_length_ptr, SQL_ERROR, SQL_FETCH_ABSOLUTE, SQL_FETCH_FIRST, SQL_FETCH_LAST, SQL_FETCH_NEXT, SQL_FETCH_PRIOR, SQL_FETCH_RELATIVE, SQL_NO_DATA, SQL_NULL_DATA, SQL_ROW_ERROR, SQL_ROW_NOROW, SQL_ROW_SUCCESS, SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQLLEN, SQLULEN, stmt, tds, TDS_CMD_FAIL, tds_cursor_fetch, TDS_CURSOR_FETCH_ABSOLUTE, TDS_CURSOR_FETCH_FIRST, TDS_CURSOR_FETCH_LAST, TDS_CURSOR_FETCH_NEXT, TDS_CURSOR_FETCH_PREV, TDS_CURSOR_FETCH_RELATIVE, tds_cursor_setrows, TDS_DBG_FUNC, TDS_DBG_INFO1, TDS_FAILED, tds_get_conversion_type, tds_process_tokens, TDS_RETURN_ROW, TDS_ROW_RESULT, TDS_STOPAT_COMPUTE, TDS_STOPAT_ROW, TDS_STOPAT_ROWFMT, TDS_TOKEN_TRAILING, and tdsdump_log.
Referenced by SQLExtendedFetch(), and SQLFetch().
|
static |
Definition at line 753 of file odbc.c.
References _wide, odbc_col_setname(), ODBC_ENTER_HSTMT, ODBC_EXIT_, odbc_stat_execute(), SQL_OV_ODBC3, SQL_SUCCEEDED, and stmt.
Referenced by SQLForeignKeys().
Definition at line 4263 of file odbc.c.
References dbc, desc_free(), i, IS_HDBC, NULL, ODBC_ENTER_HDESC, odbc_errs_add(), ODBC_EXIT_, SQL_DESC_ALLOC_USER, SQL_SUCCESS, stmt, TDS_DBG_FUNC, TDS_MAX_APP_DESC, tds_mutex_lock, tds_mutex_unlock, and tdsdump_log.
Definition at line 4125 of file odbc.c.
References env, free(), ODBC_ENTER_HENV, odbc_errs_reset(), SQL_SUCCESS, TDS_DBG_FUNC, tds_free_context, tds_mutex_free, tds_mutex_unlock, and tdsdump_log.
Referenced by SQLFreeEnv().
|
static |
Definition at line 4150 of file odbc.c.
References desc_free(), desc_free_records(), free(), NULL, ODBC_ENTER_HSTMT, odbc_errs_add(), odbc_errs_reset(), ODBC_EXIT, ODBC_EXIT_, odbc_free_cursor(), odbc_free_dynamic(), odbc_unlock_statement(), SQL_CLOSE, SQL_DROP, SQL_RESET_PARAMS, SQL_SUCCESS, SQL_UNBIND, tds_socket::state, stmt, tds, TDS_DBG_ERROR, TDS_DBG_FUNC, TDS_DEAD, tds_dstr_free(), tds_free_param_results, TDS_IDLE, tds_mutex_free, tds_mutex_lock, tds_mutex_unlock, tds_process_cancel, tds_send_cancel, TDS_SUCCEED, and tdsdump_log.
Referenced by SQLCloseCursor(), SQLDisconnect(), and SQLFreeStmt().
|
static |
Definition at line 4793 of file odbc.c.
References dbc, IS_TDSDEAD, NULL, ODBC_ENTER_HDBC, odbc_errs_add(), ODBC_EXIT, ODBC_EXIT_, odbc_set_string_oct, SQL_ATTR_ACCESS_MODE, SQL_ATTR_AUTOCOMMIT, SQL_ATTR_CONNECTION_DEAD, SQL_ATTR_CONNECTION_TIMEOUT, SQL_ATTR_CURRENT_CATALOG, SQL_ATTR_LOGIN_TIMEOUT, SQL_ATTR_ODBC_CURSORS, SQL_ATTR_PACKET_SIZE, SQL_ATTR_QUIET_MODE, SQL_ATTR_TRACE, SQL_ATTR_TRACEFILE, SQL_ATTR_TRANSLATE_LIB, SQL_ATTR_TRANSLATE_OPTION, SQL_ATTR_TXN_ISOLATION, SQL_CD_FALSE, SQL_CD_TRUE, SQL_COPT_SS_MARS_ENABLED, TDS_DBG_FUNC, tds_dstr_cstr(), and tdsdump_log.
Referenced by SQLGetConnectAttr(), and SQLGetConnectOption().
|
static |
Definition at line 4634 of file odbc.c.
References NULL, ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT, odbc_set_string, stmt, and tds_dstr_cstr().
Referenced by SQLGetCursorName().
|
static |
Definition at line 2529 of file odbc.c.
References COUT, IOUT, IRD_UPDATE, NULL, ODBC_ENTER_HDESC, odbc_errs_add(), ODBC_EXIT, ODBC_EXIT_, result, SOUT, SQL_DECIMAL, SQL_DESC_ALLOC_TYPE, SQL_DESC_ARRAY_SIZE, SQL_DESC_ARRAY_STATUS_PTR, _drecord::sql_desc_auto_unique_value, SQL_DESC_AUTO_UNIQUE_VALUE, _drecord::sql_desc_base_column_name, SQL_DESC_BASE_COLUMN_NAME, _drecord::sql_desc_base_table_name, SQL_DESC_BASE_TABLE_NAME, SQL_DESC_BIND_OFFSET_PTR, SQL_DESC_BIND_TYPE, _drecord::sql_desc_case_sensitive, SQL_DESC_CASE_SENSITIVE, _drecord::sql_desc_catalog_name, SQL_DESC_CATALOG_NAME, _drecord::sql_desc_concise_type, SQL_DESC_CONCISE_TYPE, SQL_DESC_COUNT, _drecord::sql_desc_data_ptr, SQL_DESC_DATA_PTR, _drecord::sql_desc_datetime_interval_code, SQL_DESC_DATETIME_INTERVAL_CODE, _drecord::sql_desc_datetime_interval_precision, SQL_DESC_DATETIME_INTERVAL_PRECISION, _drecord::sql_desc_display_size, SQL_DESC_DISPLAY_SIZE, _drecord::sql_desc_fixed_prec_scale, SQL_DESC_FIXED_PREC_SCALE, _drecord::sql_desc_indicator_ptr, SQL_DESC_INDICATOR_PTR, _drecord::sql_desc_label, SQL_DESC_LABEL, _drecord::sql_desc_length, SQL_DESC_LENGTH, _drecord::sql_desc_literal_prefix, SQL_DESC_LITERAL_PREFIX, _drecord::sql_desc_literal_suffix, SQL_DESC_LITERAL_SUFFIX, _drecord::sql_desc_local_type_name, SQL_DESC_LOCAL_TYPE_NAME, _drecord::sql_desc_name, SQL_DESC_NAME, _drecord::sql_desc_nullable, SQL_DESC_NULLABLE, _drecord::sql_desc_num_prec_radix, SQL_DESC_NUM_PREC_RADIX, _drecord::sql_desc_octet_length, SQL_DESC_OCTET_LENGTH, _drecord::sql_desc_octet_length_ptr, SQL_DESC_OCTET_LENGTH_PTR, _drecord::sql_desc_parameter_type, SQL_DESC_PARAMETER_TYPE, _drecord::sql_desc_precision, SQL_DESC_PRECISION, SQL_DESC_ROWS_PROCESSED_PTR, _drecord::sql_desc_rowver, SQL_DESC_ROWVER, _drecord::sql_desc_scale, SQL_DESC_SCALE, _drecord::sql_desc_schema_name, SQL_DESC_SCHEMA_NAME, _drecord::sql_desc_searchable, SQL_DESC_SEARCHABLE, _drecord::sql_desc_table_name, SQL_DESC_TABLE_NAME, _drecord::sql_desc_type, SQL_DESC_TYPE, _drecord::sql_desc_type_name, SQL_DESC_TYPE_NAME, _drecord::sql_desc_unnamed, SQL_DESC_UNNAMED, _drecord::sql_desc_unsigned, SQL_DESC_UNSIGNED, _drecord::sql_desc_updatable, SQL_DESC_UPDATABLE, SQL_ERROR, SQL_FLOAT, SQL_NO_DATA, SQL_NUMERIC, SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_TIMESTAMP, SQL_TYPE_TIMESTAMP, SQLLEN, SQLULEN, TDS_DBG_INFO1, and tdsdump_log.
Referenced by SQLGetDescField().
|
static |
Definition at line 2486 of file odbc.c.
References desc_get_dbc(), DESC_IRD, IRD_UPDATE, NULL, ODBC_ENTER_HDESC, odbc_errs_add(), ODBC_EXIT, ODBC_EXIT_, odbc_set_string, _drecord::sql_desc_datetime_interval_code, _drecord::sql_desc_name, _drecord::sql_desc_nullable, _drecord::sql_desc_octet_length, _drecord::sql_desc_precision, _drecord::sql_desc_scale, _drecord::sql_desc_type, SQL_ERROR, SQL_NO_DATA, SQL_SUCCESS, tds_dstr_cstr(), and Type.
Referenced by SQLGetDescRec().
|
static |
Definition at line 5143 of file odbc.c.
References buf, tds_socket::conn, dbc, IVAL, NULL, odbc_errs_add(), odbc_log_unimplemented_type(), odbc_rdbms_version(), odbc_set_string_oct, tds_connection::product_name, tds_connection::product_version, SIVAL, SQL_ACCESSIBLE_PROCEDURES, SQL_ACCESSIBLE_TABLES, SQL_ACTIVE_ENVIRONMENTS, SQL_AF_ALL, SQL_AGGREGATE_FUNCTIONS, SQL_ALTER_DOMAIN, SQL_ALTER_TABLE, SQL_AM_NONE, SQL_ASYNC_MODE, SQL_AT_ADD_COLUMN, SQL_AT_ADD_COLUMN_DEFAULT, SQL_AT_ADD_COLUMN_SINGLE, SQL_AT_ADD_CONSTRAINT, SQL_AT_ADD_TABLE_CONSTRAINT, SQL_AT_CONSTRAINT_NAME_DEFINITION, SQL_AT_DROP_COLUMN_RESTRICT, SQL_BATCH_ROW_COUNT, SQL_BATCH_SUPPORT, SQL_BOOKMARK_PERSISTENCE, SQL_BP_DELETE, SQL_BP_SCROLL, SQL_BP_UPDATE, SQL_BRC_EXPLICIT, SQL_BS_ROW_COUNT_EXPLICIT, SQL_BS_ROW_COUNT_PROC, SQL_BS_SELECT_EXPLICIT, SQL_BS_SELECT_PROC, SQL_CA1_ABSOLUTE, SQL_CA1_LOCK_NO_CHANGE, SQL_CA1_NEXT, SQL_CA1_POS_DELETE, SQL_CA1_POS_POSITION, SQL_CA1_POS_UPDATE, SQL_CA1_POSITIONED_DELETE, SQL_CA1_POSITIONED_UPDATE, SQL_CA1_RELATIVE, SQL_CATALOG_LOCATION, SQL_CATALOG_NAME, SQL_CATALOG_NAME_SEPARATOR, SQL_CATALOG_TERM, SQL_CATALOG_USAGE, SQL_CB_CLOSE, SQL_CB_NON_NULL, SQL_CB_NULL, SQL_CL_START, SQL_CN_ANY, SQL_COLLATION_SEQ, SQL_COLUMN_ALIAS, SQL_CONCAT_NULL_BEHAVIOR, SQL_CONVERT_BINARY, SQL_CONVERT_BIT, SQL_CONVERT_CHAR, SQL_CONVERT_DECIMAL, SQL_CONVERT_FLOAT, SQL_CONVERT_FUNCTIONS, SQL_CONVERT_INTEGER, SQL_CONVERT_LONGVARBINARY, SQL_CONVERT_LONGVARCHAR, SQL_CONVERT_NUMERIC, SQL_CONVERT_REAL, SQL_CONVERT_SMALLINT, SQL_CONVERT_TIMESTAMP, SQL_CONVERT_TINYINT, SQL_CONVERT_VARBINARY, SQL_CONVERT_VARCHAR, SQL_CONVERT_WCHAR, SQL_CONVERT_WLONGVARCHAR, SQL_CONVERT_WVARCHAR, SQL_CORRELATION_NAME, SQL_CREATE_ASSERTION, SQL_CREATE_CHARACTER_SET, SQL_CREATE_COLLATION, SQL_CREATE_DOMAIN, SQL_CREATE_SCHEMA, SQL_CREATE_TABLE, SQL_CREATE_TRANSLATION, SQL_CREATE_VIEW, SQL_CS_AUTHORIZATION, SQL_CS_CREATE_SCHEMA, SQL_CT_CREATE_TABLE, SQL_CU_DML_STATEMENTS, SQL_CU_PROCEDURE_INVOCATION, SQL_CU_TABLE_DEFINITION, SQL_CURSOR_COMMIT_BEHAVIOR, SQL_CURSOR_ROLLBACK_BEHAVIOR, SQL_CURSOR_SENSITIVITY, SQL_CV_CHECK_OPTION, SQL_CV_CREATE_VIEW, SQL_CVT_BINARY, SQL_CVT_BIT, SQL_CVT_CHAR, SQL_CVT_DECIMAL, SQL_CVT_FLOAT, SQL_CVT_INTEGER, SQL_CVT_LONGVARBINARY, SQL_CVT_LONGVARCHAR, SQL_CVT_NUMERIC, SQL_CVT_REAL, SQL_CVT_SMALLINT, SQL_CVT_TIMESTAMP, SQL_CVT_TINYINT, SQL_CVT_VARBINARY, SQL_CVT_VARCHAR, SQL_CVT_WCHAR, SQL_CVT_WLONGVARCHAR, SQL_CVT_WVARCHAR, SQL_DATA_SOURCE_NAME, SQL_DATA_SOURCE_READ_ONLY, SQL_DATABASE_NAME, SQL_DATETIME_LITERALS, SQL_DBMS_NAME, SQL_DBMS_VER, SQL_DDL_INDEX, SQL_DEFAULT_TXN_ISOLATION, SQL_DESCRIBE_PARAMETER, SQL_DRIVER_HDBC, SQL_DRIVER_HENV, SQL_DRIVER_HSTMT, SQL_DRIVER_NAME, SQL_DRIVER_ODBC_VER, SQL_DRIVER_VER, SQL_DROP_ASSERTION, SQL_DROP_CHARACTER_SET, SQL_DROP_COLLATION, SQL_DROP_DOMAIN, SQL_DROP_SCHEMA, SQL_DROP_TABLE, SQL_DROP_TRANSLATION, SQL_DROP_VIEW, SQL_DT_DROP_TABLE, SQL_DV_DROP_VIEW, SQL_DYNAMIC_CURSOR_ATTRIBUTES1, SQL_DYNAMIC_CURSOR_ATTRIBUTES2, SQL_ERROR, SQL_EXPRESSIONS_IN_ORDERBY, SQL_FD_FETCH_ABSOLUTE, SQL_FD_FETCH_FIRST, SQL_FD_FETCH_LAST, SQL_FD_FETCH_NEXT, SQL_FD_FETCH_PRIOR, SQL_FD_FETCH_RELATIVE, SQL_FETCH_DIRECTION, SQL_FILE_NOT_SUPPORTED, SQL_FILE_USAGE, SQL_FN_CVT_CAST, SQL_FN_CVT_CONVERT, 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_DEGREES, SQL_FN_NUM_EXP, SQL_FN_NUM_FLOOR, SQL_FN_NUM_LOG, SQL_FN_NUM_LOG10, SQL_FN_NUM_MOD, SQL_FN_NUM_PI, SQL_FN_NUM_POWER, SQL_FN_NUM_RADIANS, SQL_FN_NUM_RAND, SQL_FN_NUM_ROUND, SQL_FN_NUM_SIGN, SQL_FN_NUM_SIN, SQL_FN_NUM_SQRT, SQL_FN_NUM_TAN, SQL_FN_STR_ASCII, SQL_FN_STR_BIT_LENGTH, SQL_FN_STR_CHAR, SQL_FN_STR_CONCAT, SQL_FN_STR_DIFFERENCE, SQL_FN_STR_INSERT, SQL_FN_STR_LCASE, SQL_FN_STR_LEFT, SQL_FN_STR_LENGTH, SQL_FN_STR_LOCATE_2, SQL_FN_STR_LTRIM, SQL_FN_STR_OCTET_LENGTH, SQL_FN_STR_REPEAT, SQL_FN_STR_RIGHT, SQL_FN_STR_RTRIM, SQL_FN_STR_SOUNDEX, SQL_FN_STR_SPACE, SQL_FN_STR_SUBSTRING, SQL_FN_STR_UCASE, SQL_FN_SYS_DBNAME, SQL_FN_SYS_IFNULL, SQL_FN_SYS_USERNAME, SQL_FN_TD_CURDATE, SQL_FN_TD_CURRENT_DATE, SQL_FN_TD_CURRENT_TIME, SQL_FN_TD_CURRENT_TIMESTAMP, SQL_FN_TD_CURTIME, SQL_FN_TD_DAYNAME, SQL_FN_TD_DAYOFMONTH, SQL_FN_TD_DAYOFWEEK, SQL_FN_TD_DAYOFYEAR, SQL_FN_TD_EXTRACT, SQL_FN_TD_HOUR, SQL_FN_TD_MINUTE, SQL_FN_TD_MONTH, SQL_FN_TD_MONTHNAME, SQL_FN_TD_NOW, SQL_FN_TD_QUARTER, SQL_FN_TD_SECOND, SQL_FN_TD_TIMESTAMPADD, SQL_FN_TD_TIMESTAMPDIFF, SQL_FN_TD_WEEK, SQL_FN_TD_YEAR, SQL_FN_TSI_DAY, SQL_FN_TSI_FRAC_SECOND, SQL_FN_TSI_HOUR, SQL_FN_TSI_MINUTE, SQL_FN_TSI_MONTH, SQL_FN_TSI_QUARTER, SQL_FN_TSI_SECOND, SQL_FN_TSI_WEEK, SQL_FN_TSI_YEAR, SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1, SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2, SQL_GB_GROUP_BY_CONTAINS_SELECT, SQL_GD_BLOCK, SQL_GETDATA_EXTENSIONS, SQL_GROUP_BY, SQL_IC_MIXED, SQL_IDENTIFIER_CASE, SQL_IDENTIFIER_QUOTE_CHAR, SQL_IK_ASC, SQL_IK_DESC, SQL_INDEX_KEYWORDS, SQL_INFO_FREETDS_TDS_VERSION, SQL_INFO_SCHEMA_VIEWS, SQL_INSERT_STATEMENT, SQL_INTEGRITY, SQL_KEYSET_CURSOR_ATTRIBUTES1, SQL_KEYSET_CURSOR_ATTRIBUTES2, SQL_KEYWORDS, SQL_LCK_NO_CHANGE, SQL_LIKE_ESCAPE_CLAUSE, SQL_LOCK_TYPES, SQL_MAX_ASYNC_CONCURRENT_STATEMENTS, SQL_MAX_BINARY_LITERAL_LEN, SQL_MAX_CATALOG_NAME_LEN, SQL_MAX_CHAR_LITERAL_LEN, SQL_MAX_COLUMN_NAME_LEN, SQL_MAX_COLUMNS_IN_GROUP_BY, SQL_MAX_COLUMNS_IN_INDEX, SQL_MAX_COLUMNS_IN_ORDER_BY, SQL_MAX_COLUMNS_IN_SELECT, SQL_MAX_COLUMNS_IN_TABLE, SQL_MAX_CONCURRENT_ACTIVITIES, SQL_MAX_CURSOR_NAME_LEN, SQL_MAX_DRIVER_CONNECTIONS, SQL_MAX_IDENTIFIER_LEN, SQL_MAX_INDEX_SIZE, SQL_MAX_PROCEDURE_NAME_LEN, SQL_MAX_ROW_SIZE, SQL_MAX_ROW_SIZE_INCLUDES_LONG, SQL_MAX_SCHEMA_NAME_LEN, SQL_MAX_STATEMENT_LEN, SQL_MAX_TABLE_NAME_LEN, SQL_MAX_TABLES_IN_SELECT, SQL_MAX_USER_NAME_LEN, SQL_MULT_RESULT_SETS, SQL_MULTIPLE_ACTIVE_TXN, SQL_NC_LOW, SQL_NEED_LONG_DATA_LEN, SQL_NNC_NON_NULL, SQL_NON_NULLABLE_COLUMNS, SQL_NULL_COLLATION, SQL_NUMERIC_FUNCTIONS, SQL_OAC_LEVEL2, SQL_ODBC_API_CONFORMANCE, SQL_ODBC_INTERFACE_CONFORMANCE, SQL_ODBC_SAG_CLI_CONFORMANCE, SQL_ODBC_SQL_CONFORMANCE, SQL_ODBC_VER, SQL_OJ_ALL_COMPARISON_OPS, SQL_OJ_CAPABILITIES, SQL_OJ_FULL, SQL_OJ_INNER, SQL_OJ_LEFT, SQL_OJ_NESTED, SQL_OJ_NOT_ORDERED, SQL_OJ_RIGHT, SQL_ORDER_BY_COLUMNS_IN_SELECT, SQL_OSC_CORE, SQL_OSCC_NOT_COMPLIANT, SQL_OU_DML_STATEMENTS, SQL_OU_INDEX_DEFINITION, SQL_OU_PRIVILEGE_DEFINITION, SQL_OU_PROCEDURE_INVOCATION, SQL_OU_TABLE_DEFINITION, SQL_OUTER_JOINS, SQL_PARAM_ARRAY_ROW_COUNTS, SQL_PARAM_ARRAY_SELECTS, SQL_PARC_BATCH, SQL_PAS_BATCH, SQL_POS_DELETE, SQL_POS_OPERATIONS, SQL_POS_POSITION, SQL_POS_UPDATE, SQL_POSITIONED_STATEMENTS, SQL_PROCEDURE_TERM, SQL_PROCEDURES, SQL_PS_POSITIONED_DELETE, SQL_PS_POSITIONED_UPDATE, SQL_QUOTED_IDENTIFIER_CASE, SQL_ROW_UPDATES, SQL_SC_SQL92_ENTRY, SQL_SCC_ISO92_CLI, SQL_SCCO_LOCK, SQL_SCCO_OPT_ROWVER, SQL_SCCO_OPT_VALUES, SQL_SCCO_READ_ONLY, SQL_SCHEMA_TERM, SQL_SCHEMA_USAGE, SQL_SCROLL_CONCURRENCY, SQL_SCROLL_OPTIONS, SQL_SEARCH_PATTERN_ESCAPE, SQL_SENSITIVE, SQL_SERVER_NAME, SQL_SG_WITH_GRANT_OPTION, SQL_SO_DYNAMIC, SQL_SO_FORWARD_ONLY, SQL_SO_KEYSET_DRIVEN, SQL_SO_STATIC, SQL_SP_EXISTS, SQL_SP_ISNOTNULL, SQL_SP_ISNULL, SQL_SPECIAL_CHARACTERS, SQL_SQ_COMPARISON, SQL_SQ_CORRELATED_SUBQUERIES, SQL_SQ_EXISTS, SQL_SQ_IN, SQL_SQ_QUANTIFIED, SQL_SQL92_DATETIME_FUNCTIONS, SQL_SQL92_FOREIGN_KEY_DELETE_RULE, SQL_SQL92_FOREIGN_KEY_UPDATE_RULE, SQL_SQL92_GRANT, SQL_SQL92_NUMERIC_VALUE_FUNCTIONS, SQL_SQL92_PREDICATES, SQL_SQL92_RELATIONAL_JOIN_OPERATORS, SQL_SQL92_REVOKE, SQL_SQL92_ROW_VALUE_CONSTRUCTOR, SQL_SQL92_STRING_FUNCTIONS, SQL_SQL92_VALUE_EXPRESSIONS, SQL_SQL_CONFORMANCE, SQL_SR_GRANT_OPTION_FOR, SQL_SRJO_CROSS_JOIN, SQL_SRJO_FULL_OUTER_JOIN, SQL_SRJO_INNER_JOIN, SQL_SRJO_LEFT_OUTER_JOIN, SQL_SRJO_RIGHT_OUTER_JOIN, SQL_SRJO_UNION_JOIN, SQL_SRVC_DEFAULT, SQL_SRVC_NULL, SQL_SRVC_ROW_SUBQUERY, SQL_SRVC_VALUE_EXPRESSION, SQL_SSF_LOWER, SQL_SSF_UPPER, SQL_STANDARD_CLI_CONFORMANCE, SQL_STATIC_CURSOR_ATTRIBUTES1, SQL_STATIC_CURSOR_ATTRIBUTES2, SQL_STATIC_SENSITIVITY, SQL_STRING_FUNCTIONS, SQL_SUBQUERIES, SQL_SUCCESS, SQL_SVE_CASE, SQL_SVE_CAST, SQL_SVE_COALESCE, SQL_SVE_NULLIF, SQL_SYSTEM_FUNCTIONS, SQL_TABLE_TERM, SQL_TC_ALL, SQL_TIMEDATE_ADD_INTERVALS, SQL_TIMEDATE_DIFF_INTERVALS, SQL_TIMEDATE_FUNCTIONS, SQL_TXN_CAPABLE, SQL_TXN_ISOLATION_OPTION, SQL_TXN_READ_COMMITTED, SQL_TXN_READ_UNCOMMITTED, SQL_TXN_REPEATABLE_READ, SQL_TXN_SERIALIZABLE, SQL_U_UNION, SQL_U_UNION_ALL, SQL_UNION, SQL_USER_NAME, SQL_XOPEN_CLI_YEAR, SQLULEN, tds, TDS_DBG_FUNC, tds_dstr_cstr(), TDS_IS_MSSQL, TDS_MAJOR, TDS_MINOR, TDS_VERSION_MAJOR, TDS_VERSION_MINOR, TDS_VERSION_SUBVERSION, tdsdump_log, UIVAL, ULVAL, USIVAL, and VERSION.
Referenced by SQLGetInfo(), and SQLSetScrollOptions().
|
static |
Definition at line 4303 of file odbc.c.
References NULL, ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT, ODBC_EXIT_, odbc_lock_statement(), odbc_set_string_oct, ncbi::grid::netcache::search::fields::size, SQL_ATTR_APP_PARAM_DESC, SQL_ATTR_APP_ROW_DESC, SQL_ATTR_ASYNC_ENABLE, SQL_ATTR_CONCURRENCY, SQL_ATTR_CURSOR_SCROLLABLE, SQL_ATTR_CURSOR_SENSITIVITY, SQL_ATTR_CURSOR_TYPE, SQL_ATTR_ENABLE_AUTO_IPD, SQL_ATTR_FETCH_BOOKMARK_PTR, SQL_ATTR_IMP_PARAM_DESC, SQL_ATTR_IMP_ROW_DESC, SQL_ATTR_KEYSET_SIZE, SQL_ATTR_MAX_LENGTH, SQL_ATTR_MAX_ROWS, SQL_ATTR_METADATA_ID, SQL_ATTR_NOSCAN, SQL_ATTR_PARAM_BIND_OFFSET_PTR, SQL_ATTR_PARAM_BIND_TYPE, SQL_ATTR_PARAM_OPERATION_PTR, SQL_ATTR_PARAM_STATUS_PTR, SQL_ATTR_PARAMS_PROCESSED_PTR, SQL_ATTR_PARAMSET_SIZE, SQL_ATTR_QUERY_TIMEOUT, SQL_ATTR_RETRIEVE_DATA, SQL_ATTR_ROW_ARRAY_SIZE, SQL_ATTR_ROW_BIND_OFFSET_PTR, SQL_ATTR_ROW_BIND_TYPE, SQL_ATTR_ROW_NUMBER, SQL_ATTR_ROW_OPERATION_PTR, SQL_ATTR_ROW_STATUS_PTR, SQL_ATTR_ROWS_FETCHED_PTR, SQL_ATTR_SIMULATE_CURSOR, SQL_ATTR_USE_BOOKMARKS, SQL_BIND_TYPE, SQL_ROWSET_SIZE, SQL_SOPT_SS_QUERYNOTIFICATION_MSGTEXT, SQL_SOPT_SS_QUERYNOTIFICATION_OPTIONS, SQL_SOPT_SS_QUERYNOTIFICATION_TIMEOUT, stmt, tds_cursor_get_cursor_info, tds_dstr_cstr(), and tds_dstr_len().
Referenced by SQLGetStmtOption().
|
static |
Definition at line 1043 of file odbc.c.
References dbc, DSTR_INITIALIZER, IS_VALID_LEN, native_sql(), NULL, odbc_dstr_copy(), ODBC_ENTER_HDBC, odbc_errs_add(), ODBC_EXIT, ODBC_EXIT_, odbc_set_string, query, SQL_SUCCESS, tds_dstr_cstr(), and tds_dstr_free().
Referenced by SQLNativeSql().
|
static |
Definition at line 6131 of file odbc.c.
References _SQLExecute(), NULL, ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT, ODBC_EXIT_, parse_prepared_query(), SQL_ERROR, SQL_NEED_DATA, SQL_SUCCESS, stmt, TDS_DBG_FUNC, and tdsdump_log.
Referenced by SQLParamData().
|
static |
Definition at line 4539 of file odbc.c.
References _wide, IS_TDS7_PLUS, NULL, ODBC_ENTER_HSTMT, ODBC_EXIT, ODBC_EXIT_, odbc_free_dynamic(), odbc_lock_statement(), odbc_prepare(), odbc_set_stmt_query(), prepare_call(), SQL_CONCUR_READ_ONLY, SQL_CURSOR_FORWARD_ONLY, SQL_ERROR, SQL_SUCCESS, stmt, tds_count_placeholders, TDS_DBG_INFO1, tds_dstr_cstr(), tds_free_param_results, tds_release_dynamic, and tdsdump_log.
Referenced by SQLPrepare().
|
static |
Definition at line 1096 of file odbc.c.
References _wide, odbc_col_setname(), ODBC_ENTER_HSTMT, ODBC_EXIT_, odbc_stat_execute(), SQL_OV_ODBC3, SQL_SUCCEEDED, and stmt.
Referenced by SQLPrimaryKeys().
|
static |
Definition at line 1113 of file odbc.c.
References _wide, NULL, odbc_col_setname(), ODBC_ENTER_HSTMT, ODBC_EXIT_, ODBC_SPECIAL_PROCEDURECOLUMNS, odbc_stat_execute(), SQL_OV_ODBC3, SQL_SUCCEEDED, stmt, TDS_IS_MSSQL, and TDS_IS_SYBASE.
Referenced by SQLProcedureColumns().
|
static |
Definition at line 1138 of file odbc.c.
References _wide, odbc_col_setname(), ODBC_ENTER_HSTMT, ODBC_EXIT_, odbc_stat_execute(), SQL_OV_ODBC3, SQL_SUCCEEDED, and stmt.
Referenced by SQLProcedures().
Definition at line 4598 of file odbc.c.
References ODBC_ENTER_HSTMT, ODBC_EXIT_, stmt, TDS_DBG_FUNC, and tdsdump_log.
Referenced by SQLRowCount().
|
static |
Definition at line 6209 of file odbc.c.
References _wide0, change_autocommit(), change_database(), change_txn(), dbc, DSTR_INITIALIZER, IS_VALID_LEN, NULL, odbc_bcp_batch(), odbc_bcp_bind(), odbc_bcp_colptr(), odbc_bcp_control(), odbc_bcp_done(), odbc_bcp_init(), odbc_bcp_sendrow(), ODBC_CHAR, odbc_dstr_copy(), odbc_dstr_copy_oct, ODBC_ENTER_HDBC, odbc_errs_add(), ODBC_EXIT_, SQL_ATTR_ACCESS_MODE, SQL_ATTR_AUTOCOMMIT, SQL_ATTR_CONNECTION_TIMEOUT, SQL_ATTR_CURRENT_CATALOG, SQL_ATTR_CURSOR_TYPE, SQL_ATTR_LOGIN_TIMEOUT, SQL_ATTR_ODBC_CURSORS, SQL_ATTR_PACKET_SIZE, SQL_ATTR_QUIET_MODE, SQL_ATTR_TRACE, SQL_ATTR_TRACEFILE, SQL_ATTR_TRANSLATE_LIB, SQL_ATTR_TRANSLATE_OPTION, SQL_ATTR_TXN_ISOLATION, SQL_COPT_SS_MARS_ENABLED, SQL_COPT_SS_OLDPWD, SQL_SUCCESS, SQLULEN, TDS_DBG_FUNC, tds_dstr_cstr(), tds_dstr_free(), tds_dstr_len(), and tdsdump_log.
Referenced by SQLSetConnectAttr(), and SQLSetConnectOption().
|
static |
Definition at line 4617 of file odbc.c.
References NULL, odbc_dstr_copy(), ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT_, and stmt.
Referenced by SQLSetCursorName().
|
static |
Definition at line 2731 of file odbc.c.
References desc_alloc_records(), desc_get_dbc(), DESC_IPD, DESC_IRD, DESC_SET_NEED_REPREPARE, IIN, int, n, NULL, ODBC_CHAR, odbc_dstr_copy_oct, ODBC_ENTER_HDESC, odbc_errs_add(), ODBC_EXIT, ODBC_EXIT_, odbc_set_concise_c_type(), odbc_set_concise_sql_type(), PIN, result, SQL_DECIMAL, SQL_DESC_ALLOC_TYPE, SQL_DESC_ARRAY_SIZE, SQL_DESC_ARRAY_STATUS_PTR, SQL_DESC_AUTO_UNIQUE_VALUE, SQL_DESC_BASE_COLUMN_NAME, SQL_DESC_BASE_TABLE_NAME, SQL_DESC_BIND_TYPE, SQL_DESC_CASE_SENSITIVE, SQL_DESC_CATALOG_NAME, _drecord::sql_desc_concise_type, SQL_DESC_CONCISE_TYPE, SQL_DESC_COUNT, _drecord::sql_desc_data_ptr, SQL_DESC_DATA_PTR, SQL_DESC_DISPLAY_SIZE, SQL_DESC_FIXED_PREC_SCALE, _drecord::sql_desc_indicator_ptr, SQL_DESC_INDICATOR_PTR, SQL_DESC_LABEL, _drecord::sql_desc_length, SQL_DESC_LENGTH, SQL_DESC_LITERAL_PREFIX, SQL_DESC_LITERAL_SUFFIX, SQL_DESC_LOCAL_TYPE_NAME, _drecord::sql_desc_name, SQL_DESC_NAME, SQL_DESC_NULLABLE, _drecord::sql_desc_num_prec_radix, SQL_DESC_NUM_PREC_RADIX, _drecord::sql_desc_octet_length, SQL_DESC_OCTET_LENGTH, _drecord::sql_desc_octet_length_ptr, SQL_DESC_OCTET_LENGTH_PTR, _drecord::sql_desc_parameter_type, SQL_DESC_PARAMETER_TYPE, _drecord::sql_desc_precision, SQL_DESC_PRECISION, SQL_DESC_ROWS_PROCESSED_PTR, SQL_DESC_ROWVER, _drecord::sql_desc_scale, SQL_DESC_SCALE, SQL_DESC_SCHEMA_NAME, SQL_DESC_SEARCHABLE, SQL_DESC_TABLE_NAME, _drecord::sql_desc_type, SQL_DESC_TYPE, SQL_DESC_TYPE_NAME, _drecord::sql_desc_unnamed, SQL_DESC_UNNAMED, SQL_DESC_UNSIGNED, SQL_DESC_UPDATABLE, SQL_ERROR, SQL_NUMERIC, SQL_SUCCESS, SQLLEN, SQLULEN, TDS_DBG_INFO1, and tdsdump_log.
Referenced by SQLSetDescField().
|
static |
Definition at line 6393 of file odbc.c.
References IS_VALID_LEN, NULL, ODBC_CHAR, odbc_dstr_copy_oct, ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT_, orig, SQL_ATTR_APP_PARAM_DESC, SQL_ATTR_APP_ROW_DESC, SQL_ATTR_ASYNC_ENABLE, SQL_ATTR_CONCURRENCY, SQL_ATTR_CURSOR_SCROLLABLE, SQL_ATTR_CURSOR_SENSITIVITY, SQL_ATTR_CURSOR_TYPE, SQL_ATTR_ENABLE_AUTO_IPD, SQL_ATTR_FETCH_BOOKMARK_PTR, SQL_ATTR_IMP_PARAM_DESC, SQL_ATTR_IMP_ROW_DESC, SQL_ATTR_KEYSET_SIZE, SQL_ATTR_MAX_LENGTH, SQL_ATTR_MAX_ROWS, SQL_ATTR_METADATA_ID, SQL_ATTR_NOSCAN, SQL_ATTR_PARAM_BIND_OFFSET_PTR, SQL_ATTR_PARAM_BIND_TYPE, SQL_ATTR_PARAM_OPERATION_PTR, SQL_ATTR_PARAM_STATUS_PTR, SQL_ATTR_PARAMS_PROCESSED_PTR, SQL_ATTR_PARAMSET_SIZE, SQL_ATTR_QUERY_TIMEOUT, SQL_ATTR_RETRIEVE_DATA, SQL_ATTR_ROW_ARRAY_SIZE, SQL_ATTR_ROW_BIND_OFFSET_PTR, SQL_ATTR_ROW_BIND_TYPE, SQL_ATTR_ROW_NUMBER, SQL_ATTR_ROW_OPERATION_PTR, SQL_ATTR_ROW_STATUS_PTR, SQL_ATTR_ROWS_FETCHED_PTR, SQL_ATTR_SIMULATE_CURSOR, SQL_ATTR_USE_BOOKMARKS, SQL_BIND_TYPE, SQL_CONCUR_LOCK, SQL_CONCUR_READ_ONLY, SQL_CONCUR_ROWVER, SQL_CONCUR_VALUES, SQL_CURSOR_DYNAMIC, SQL_CURSOR_FORWARD_ONLY, SQL_CURSOR_KEYSET_DRIVEN, SQL_CURSOR_STATIC, SQL_DESC_ALLOC_USER, SQL_INSENSITIVE, SQL_NONSCROLLABLE, SQL_ROWSET_SIZE, SQL_SCROLLABLE, SQL_SENSITIVE, SQL_SOPT_SS_QUERYNOTIFICATION_MSGTEXT, SQL_SOPT_SS_QUERYNOTIFICATION_OPTIONS, SQL_SOPT_SS_QUERYNOTIFICATION_TIMEOUT, SQL_UNSPECIFIED, SQLLEN, SQLULEN, stmt, TDS_DBG_FUNC, tdsdump_log, and val.
Referenced by _SQLAllocStmt(), SQLParamOptions(), SQLSetScrollOptions(), and SQLSetStmtOption().
|
static |
Definition at line 6732 of file odbc.c.
References _wide, IS_VALID_LEN, NULL, odbc_col_setname(), ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT_, odbc_get_string_size(), ODBC_SPECIAL_SPECIALCOLUMNS, odbc_stat_execute(), SQL_BEST_ROWID, SQL_NO_NULLS, SQL_NULLABLE, SQL_OV_ODBC3, SQL_ROWVER, SQL_SCOPE_CURROW, SQL_SCOPE_SESSION, SQL_SCOPE_TRANSACTION, SQL_SUCCEEDED, stmt, TDS_DBG_FUNC, TDS_IS_MSSQL, TDS_IS_SYBASE, and tdsdump_log.
Referenced by SQLSpecialColumns().
|
static |
Definition at line 6809 of file odbc.c.
References _wide, IS_VALID_LEN, NULL, odbc_col_setname(), ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT_, odbc_get_string_size(), odbc_stat_execute(), SQL_ENSURE, SQL_INDEX_ALL, SQL_INDEX_UNIQUE, SQL_OV_ODBC3, SQL_QUICK, SQL_SUCCEEDED, stmt, TDS_DBG_FUNC, TDS_IS_MSSQL, and tdsdump_log.
Referenced by SQLStatistics().
|
static |
Definition at line 1277 of file odbc.c.
References _wide, odbc_col_setname(), ODBC_ENTER_HSTMT, ODBC_EXIT_, odbc_stat_execute(), SQL_OV_ODBC3, SQL_SUCCEEDED, and stmt.
Referenced by SQLTablePrivileges().
|
static |
Definition at line 6868 of file odbc.c.
References _wide, tds_socket::conn, DSTR_INITIALIZER, free(), NULL, odbc_col_setname(), odbc_dstr_copy(), ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT_, odbc_stat_execute(), proc, tds_connection::product_version, SQL_FALSE, SQL_NTS, SQL_OV_ODBC3, SQL_SUCCEEDED, stmt, util::strcmp(), table_name, tds, TDS_DBG_FUNC, TDS_DBG_INFO1, tds_dstr_copy(), tds_dstr_cstr(), tds_dstr_free(), tds_dstr_isempty(), tds_dstr_len(), tds_dstr_set(), TDS_IS_MSSQL, TDS_MS_VER, tds_new, tdsdump_log, and type.
Referenced by SQLTables().
|
static |
Definition at line 4694 of file odbc.c.
References change_transaction(), dbc, ODBC_ENTER_HDBC, ODBC_EXIT, SQL_COMMIT, TDS_DBG_FUNC, and tdsdump_log.
Referenced by SQLTransact().
Definition at line 181 of file odbc.c.
References dbc, odbc_errs_add(), ODBC_RETURN_, tds_socket::query_timeout, SQL_AUTOCOMMIT_ON, SQL_ERROR, SQL_SUCCESS, tds_socket::state, tds, TDS_FAILED, TDS_IDLE, tds_process_simple_query, tds_submit_begin_tran, and tds_submit_rollback.
Referenced by _SQLSetConnectAttr(), and odbc_connect().
|
static |
Definition at line 220 of file odbc.c.
References database, dbc, free(), NULL, odbc_errs_add(), ODBC_RETURN_, query, tds_socket::query_timeout, SQL_ERROR, tds_socket::state, tds, TDS_DBG_INFO1, tds_dstr_copyn(), TDS_FAILED, TDS_IDLE, tds_new, tds_process_simple_query, tds_quote_id, tds_submit_query, and tdsdump_log.
Referenced by _SQLSetConnectAttr().
Definition at line 4652 of file odbc.c.
References dbc, NULL, odbc_errs_add(), tds_socket::query_timeout, SQL_AUTOCOMMIT_ON, SQL_ERROR, SQL_SUCCESS, tds_socket::state, tds, TDS_DBG_INFO1, TDS_FAILED, TDS_IDLE, TDS_PENDING, tds_process_simple_query, tds_submit_commit, tds_submit_rollback, and tdsdump_log.
Referenced by _SQLTransact().
|
static |
Definition at line 265 of file odbc.c.
References dbc, NULL, odbc_errs_add(), ODBC_SAFE_ERROR, query, tds_socket::query_timeout, SQL_ERROR, SQL_SUCCESS, SQL_TXN_READ_COMMITTED, SQL_TXN_READ_UNCOMMITTED, SQL_TXN_REPEATABLE_READ, SQL_TXN_SERIALIZABLE, tds_socket::state, tds, TDS_FAILED, TDS_IDLE, tds_process_simple_query, and tds_submit_query.
Referenced by _SQLSetConnectAttr(), and odbc_connect().
|
static |
Definition at line 7189 of file odbc.c.
References tds_column::column_cur_size, tds_column::column_data, tds_column::column_name, tds_column::column_size, tds_result_info::columns, tds_socket::conn, IS_TDS7_PLUS, len, NULL, tds_result_info::num_cols, SYBVARCHAR, tds, tds_alloc_param_data, tds_alloc_param_result, tds_dstr_copy(), tds_set_param_type, rapidjson::value, and XSYBNVARCHAR.
Referenced by odbc_stat_execute().
|
static |
Definition at line 7214 of file odbc.c.
References tds_column::column_cur_size, tds_column::column_data, tds_column::column_name, tds_result_info::columns, tds_socket::conn, NULL, tds_result_info::num_cols, SYBINT4, tds, tds_alloc_param_data, tds_alloc_param_result, tds_dstr_copy(), tds_set_param_type, and rapidjson::value.
Referenced by odbc_stat_execute().
|
static |
Definition at line 1155 of file odbc.c.
References tds_column::column_name, tds_result_info::columns, n, NULL, tds_result_info::num_cols, odbc_errs_add(), odbc_sql2tds(), _drecord::sql_desc_base_table_name, _drecord::sql_desc_name, _drecord::sql_desc_updatable, SQL_ERROR, SQL_FALSE, SQL_NEED_DATA, stmt, tds_column::table_name, tds_alloc_param_result, tds_dstr_dup(), and tds_free_param_results.
Referenced by SQLSetPos().
Definition at line 152 of file odbc.c.
References tds_column::column_name, tds_result_info::columns, IRD_CHECK, NULL, odbc_errs_add(), stmt, tds_column::table_column_name, tds_dstr_copy(), and tds_dstr_empty.
Referenced by _SQLColumnPrivileges(), _SQLColumns(), _SQLForeignKeys(), _SQLPrimaryKeys(), _SQLProcedureColumns(), _SQLProcedures(), _SQLSpecialColumns(), _SQLStatistics(), _SQLTablePrivileges(), _SQLTables(), and SQLGetTypeInfo().
Definition at line 356 of file odbc.c.
References change_autocommit(), change_txn(), tds_login::client_charset, tds_login::connect_timeout, dbc, env, IS_TDS72_PLUS, IS_TDS7_PLUS, login, tds_login::mars, tds_login::new_password, NULL, odbc_env_change(), odbc_errs_add(), ODBC_RETURN, ODBC_RETURN_, tds_login::password, SQL_AUTOCOMMIT_OFF, SQL_AUTOCOMMIT_ON, SQL_ERROR, SQL_MARS_ENABLED_NO, SQL_SUCCEEDED, SQL_SUCCESS, SQL_TXN_READ_COMMITTED, tds_alloc_socket, tds_connect_and_login, tds_dstr_copy(), tds_dstr_cstr(), tds_dstr_dup(), TDS_FAILED, tds_fix_login, tds_free_socket, tds_iconv_get, tds_set_bulk, tds_set_parent, and tds_login::use_new_password.
Referenced by _SQLConnect(), _SQLDriverConnect(), ConnectWithTxn(), DoTest(), main(), Test(), test(), TestRawODBCDirectQuery(), TestRawODBCGuid(), and TestRawODBCPreparedQuery().
Definition at line 3152 of file odbc.c.
References assert, tds_cursor::concurrency, tds_socket::conn, tds_cursor::cursor_id, i, IS_TDS7_PLUS, NULL, odbc_errs_add(), odbc_process_tokens(), odbc_unlock_statement(), tds_socket::rows_affected, SQL_CONCUR_LOCK, SQL_CONCUR_READ_ONLY, SQL_CONCUR_ROWVER, SQL_CONCUR_VALUES, SQL_CURSOR_DYNAMIC, SQL_CURSOR_FORWARD_ONLY, SQL_CURSOR_KEYSET_DRIVEN, SQL_CURSOR_STATIC, stmt, tds, tds_alloc_cursor, TDS_CMD_DONE, TDS_CMD_FAIL, TDS_CUR_CONCUR_OPTIMISTIC, TDS_CUR_CONCUR_OPTIMISTIC_VALUES, TDS_CUR_CONCUR_READ_ONLY, TDS_CUR_CONCUR_SCROLL_LOCKS, TDS_CUR_TYPE_DYNAMIC, TDS_CUR_TYPE_FORWARD, TDS_CUR_TYPE_KEYSET, TDS_CUR_TYPE_STATIC, tds_cursor_dealloc, tds_cursor_declare, tds_cursor_open, tds_cursor_setname, tds_dstr_cstr(), tds_dstr_isempty(), tds_dstr_len(), TDS_FAIL, TDS_FAILED, tds_flush_packet, TDS_PENDING, tds_release_cursor, TDS_RETURN_DONE, tds_set_state, TDS_STOPAT_COMPUTE, TDS_STOPAT_ROW, TDS_SUCCEED, TDS_SUCCESS, and tds_cursor::type.
Referenced by _SQLExecute().
Definition at line 335 of file odbc.c.
References assert, dbc, odbc_get_dbc(), tds, tds_dstr_copy(), TDS_ENV_DATABASE, and TDS_ENV_PACKSIZE.
Referenced by odbc_connect().
|
static |
Definition at line 2350 of file odbc.c.
References ctx, dbc, _sql_errors::errs, tds_socket::in_cancel, msg(), NULL, odbc_errs_add(), odbc_errs_add_rdbms(), odbc_get_dbc(), odbc_get_stmt(), SQL_ERROR, SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, stmt, util::strncmp(), tds, tds_close_socket, TDS_DBG_INFO1, TDS_INT_CANCEL, TDS_INT_TIMEOUT, TDS_IS_MSSQL, tdsdump_log, TDSEFCON, and TDSETIME.
Referenced by _SQLAllocEnv().
Definition at line 3683 of file odbc.c.
References tds_column::column_cur_size, tds_column::column_data, tds_column::column_size, tds_column::column_type, tds_result_info::columns, tds_socket::current_results, data, tds_result_info::num_cols, odbc_swap_datetime_sql_type(), stmt, SYBINT2, SYBINT4, tds, and tds_get_conversion_type.
Referenced by _SQLFetch().
Close server cursors.
Definition at line 7408 of file odbc.c.
References tds_socket::conn, tds_cursor_status::dealloc, odbc_lock_statement(), ODBC_SAFE_ERROR, SQL_ERROR, SQL_SUCCESS, tds_cursor::status, stmt, tds, tds_cursor_close, tds_cursor_dealloc, TDS_CURSOR_STATE_REQUESTED, tds_deferred_cursor_dealloc, tds_process_simple_query, tds_release_cursor, and TDS_SUCCEED.
Referenced by _SQLFreeStmt().
Definition at line 7373 of file odbc.c.
References tds_socket::conn, odbc_lock_statement(), ODBC_SAFE_ERROR, odbc_unlock_statement(), SQL_ERROR, SQL_SUCCESS, stmt, tds, tds_deferred_unprepare, tds_needs_unprepare, tds_process_simple_query, tds_release_dynamic, tds_submit_unprepare, TDS_SUCCEED, and TDS_SUCCESS.
Referenced by _SQLExecute(), _SQLFreeStmt(), and _SQLPrepare().
Definition at line 313 of file odbc.c.
References assert, chk(), NULL, SQL_HANDLE_DBC, SQL_HANDLE_STMT, tds, and tds_get_parent.
Referenced by odbc_env_change(), and odbc_errmsg_handler().
Definition at line 325 of file odbc.c.
References chk(), NULL, SQL_HANDLE_STMT, tds, and tds_get_parent.
Referenced by odbc_errmsg_handler().
|
static |
Definition at line 3237 of file odbc.c.
References head, NULL, stmt, tds_dstr_cstr(), and tds_dstr_isempty().
Referenced by _SQLExecute().
Definition at line 774 of file odbc.c.
References tds_socket::conn, DEFAULT_QUERY_TIMEOUT, NULL, odbc_errs_add(), tds_socket::query_timeout, tds_socket::state, stmt, tds, tds_alloc_additional_socket, TDS_IDLE, tds_mutex_lock, tds_mutex_unlock, and tds_set_parent.
Referenced by _SQLExecute(), _SQLFetch(), _SQLGetStmtAttr(), _SQLPrepare(), odbc_free_cursor(), odbc_free_dynamic(), odbc_update_ird(), and SQLSetPos().
Log a useful message about unimplemented options Defying belief, Microsoft defines mutually exclusive options that some ODBC implementations #define as duplicate values (meaning, of course, that they couldn't be implemented in the same function because they're indistinguishable.
Those duplicates are commented out below.
Definition at line 7026 of file odbc.c.
References SQL_COLLATION_SEQ, SQL_CONVERT_BIGINT, SQL_CONVERT_DATE, SQL_CONVERT_DOUBLE, SQL_CONVERT_INTERVAL_DAY_TIME, SQL_CONVERT_INTERVAL_YEAR_MONTH, SQL_DM_VER, SQL_DRIVER_HDESC, SQL_DRIVER_HLIB, SQL_USER_NAME, TDS_DBG_INFO1, and tdsdump_log.
Referenced by _SQLGetInfo().
Definition at line 3030 of file odbc.c.
References buf, tds_column::column_hidden, tds_column::column_identity, tds_column::column_name, tds_column::column_nullable, tds_column::column_prec, tds_column::column_scale, tds_column::column_writeable, tds_result_info::columns, desc_alloc_records(), desc_free_records(), i, NULL, tds_result_info::num_cols, odbc_errs_add(), odbc_set_sql_type_info(), odbc_unquote(), _hdesc::records, _drecord::sql_desc_auto_unique_value, _drecord::sql_desc_base_column_name, _drecord::sql_desc_base_table_name, _drecord::sql_desc_case_sensitive, _drecord::sql_desc_catalog_name, _drecord::sql_desc_fixed_prec_scale, _drecord::sql_desc_label, _drecord::sql_desc_name, _drecord::sql_desc_nullable, _drecord::sql_desc_octet_length_ptr, _drecord::sql_desc_rowver, _drecord::sql_desc_schema_name, _drecord::sql_desc_searchable, _drecord::sql_desc_unnamed, _drecord::sql_desc_updatable, SQL_ERROR, SQL_FALSE, SQL_NAMED, SQL_PRED_SEARCHABLE, SQL_SUCCESS, SQL_TRUE, SQL_UNNAMED, SQL_UNSEARCHABLE, stmt, tds_column::table_column_name, tds_column::table_name, tds_dstr_copy(), tds_dstr_cstr(), tds_dstr_dup(), tds_dstr_isempty(), and tds_skip_quoted.
Referenced by _SQLExecute(), _SQLFetch(), odbc_prepare(), odbc_process_tokens(), and SQLMoreResults().
Definition at line 478 of file odbc.c.
References desc_free_records(), NULL, odbc_errs_add(), odbc_populate_ird(), ODBC_RETURN_, ODBC_SAFE_ERROR, odbc_unlock_statement(), PRE_NORMAL_ROW, tds_socket::rows_affected, SQL_ERROR, stmt, tds, TDS_CANCELLED, TDS_DONE_ERROR, TDS_DONE_RESULT, TDS_DONEINPROC_RESULT, TDS_DONEPROC_RESULT, tds_dstr_cstr(), TDS_FAILED, TDS_NO_COUNT, TDS_NO_MORE_RESULTS, tds_process_tokens, tds_release_dynamic, TDS_RETURN_DONE, TDS_RETURN_ROWFMT, TDS_ROWFMT_RESULT, tds_submit_prepare, and TDS_SUCCESS.
Referenced by _SQLPrepare(), and odbc_update_ird().
Definition at line 3594 of file odbc.c.
References tds_socket::current_op, NULL, odbc_errs_add(), ODBC_MIN, odbc_populate_ird(), odbc_set_return_params(), odbc_set_return_status(), PRE_NORMAL_ROW, PRId64, tds_socket::rows_affected, SQL_ERROR, SQL_OV_ODBC3, SQL_SUCCESS_WITH_INFO, stmt, tds, TDS_CANCELLED, TDS_CMD_DONE, TDS_CMD_FAIL, TDS_DBG_FUNC, TDS_DONE_COUNT, TDS_DONE_ERROR, TDS_DONE_RESULT, TDS_DONEINPROC_RESULT, TDS_DONEPROC_RESULT, tds_free_all_results, TDS_NO_COUNT, TDS_NO_MORE_RESULTS, TDS_OP_EXECUTE, TDS_PARAM_RESULT, tds_process_tokens, TDS_RETURN_DONE, TDS_RETURN_PROC, TDS_STATUS_RESULT, TDS_STOPAT_MSG, TDS_SUCCESS, and tdsdump_log.
Referenced by _SQLExecute(), _SQLFetch(), odbc_cursor_execute(), and SQLMoreResults().
Definition at line 130 of file odbc.c.
References SQL_ERROR, SQL_INVALID_HANDLE, SQL_NEED_DATA, SQL_NO_DATA, SQL_STILL_EXECUTING, SQL_SUCCESS, and SQL_SUCCESS_WITH_INFO.
Definition at line 7103 of file odbc.c.
References assert, buf, dbc, len, prev(), SQL_FALSE, tds_dstr_cstr(), and tds_dstr_len().
Referenced by odbc_stat_execute().
|
static |
Definition at line 7238 of file odbc.c.
References _SQLExecute(), _wide0, assert, buf, convert(), DSTR_INITIALIZER, i, int, l(), len, NULL, tds_result_info::num_cols, odbc_add_char_param(), odbc_add_int_param(), ODBC_CHAR, odbc_dstr_copy(), odbc_errs_add(), odbc_quote_metadata(), ODBC_RETURN, odbc_set_stmt_query(), odbc_upper_column_names(), out(), proc, SQL_ERROR, SQL_OV_ODBC3, SQL_SUCCEEDED, SQL_SUCCESS, stmt, tds_alloc_results, tds_dstr_alloc(), tds_dstr_buf(), tds_dstr_copyn(), tds_dstr_cstr(), tds_dstr_dup(), tds_dstr_free(), tds_dstr_isempty(), tds_dstr_len(), tds_dstr_setlen(), tds_free_param_results, tds_free_results, tds_quote_id, type, and rapidjson::value.
Referenced by _SQLColumnPrivileges(), _SQLColumns(), _SQLForeignKeys(), _SQLPrimaryKeys(), _SQLProcedureColumns(), _SQLProcedures(), _SQLSpecialColumns(), _SQLStatistics(), _SQLTablePrivileges(), and _SQLTables().
|
static |
Change sql datatype to a specific version.
sql_type | sql data type to change (any type) |
version | ODBC version to change to, 2 for ODBC 2, 3 for ODBC 3, 0 swap |
Definition at line 5981 of file odbc.c.
References SQL_DATE, SQL_TIME, SQL_TIMESTAMP, SQL_TYPE_DATE, SQL_TYPE_TIME, SQL_TYPE_TIMESTAMP, and dtl::version.
Referenced by odbc_fix_data_type_col(), and SQLGetTypeInfo().
Definition at line 839 of file odbc.c.
References assert, NULL, tds_socket::state, stmt, tds, TDS_DEAD, tds_free_socket, TDS_IDLE, tds_mutex_lock, tds_mutex_unlock, and tds_set_parent.
Referenced by _SQLExecute(), _SQLFetch(), _SQLFreeStmt(), odbc_cursor_execute(), odbc_free_dynamic(), odbc_prepare(), SQLCancel(), SQLMoreResults(), and SQLSetPos().
|
static |
Definition at line 2994 of file odbc.c.
Referenced by odbc_populate_ird().
Definition at line 444 of file odbc.c.
References IS_TDS7_PLUS, NULL, odbc_lock_statement(), odbc_prepare(), ODBC_RETURN_, SQL_SUCCESS, start_parse_prepared_query(), stmt, and tds_free_param_results.
Definition at line 5935 of file odbc.c.
References tds_column::column_name, tds_result_info::columns, tds_socket::current_results, _hdesc::header, IRD_CHECK, len, n, tds_result_info::num_cols, _hdesc::records, _dheader::sql_desc_count, _drecord::sql_desc_label, _drecord::sql_desc_name, stmt, tds, tds_ascii_strupr(), tds_dstr_buf(), and tds_dstr_len().
Referenced by odbc_stat_execute(), and SQLGetTypeInfo().
Definition at line 1601 of file odbc.c.
References _SQLAllocConnect(), TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLAllocEnv | ( | SQLHENV FAR * | phenv | ) |
Definition at line 1646 of file odbc.c.
References _SQLAllocEnv(), SQL_OV_ODBC2, TDS_DBG_FUNC, and tdsdump_log.
Definition at line 1794 of file odbc.c.
References _SQLAllocStmt(), TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLBindCol | ( | SQLHSTMT | hstmt, |
SQLUSMALLINT | icol, | ||
SQLSMALLINT | fCType, | ||
SQLPOINTER | rgbValue, | ||
SQLLEN | cbValueMax, | ||
SQLLEN FAR * | pcbValue | ||
) |
Definition at line 1802 of file odbc.c.
References desc_alloc_records(), _hdesc::header, IS_VALID_LEN, NULL, ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT_, odbc_set_concise_c_type(), _hdesc::records, SQL_C_BINARY, SQL_C_CHAR, SQL_C_DEFAULT, SQL_C_WCHAR, _dheader::sql_desc_count, _drecord::sql_desc_data_ptr, _drecord::sql_desc_indicator_ptr, _drecord::sql_desc_octet_length, _drecord::sql_desc_octet_length_ptr, SQL_SUCCESS, stmt, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLBindParam | ( | SQLHSTMT | hstmt, |
SQLUSMALLINT | ipar, | ||
SQLSMALLINT | fCType, | ||
SQLSMALLINT | fSqlType, | ||
SQLULEN | cbColDef, | ||
SQLSMALLINT | ibScale, | ||
SQLPOINTER | rgbValue, | ||
SQLLEN FAR * | pcbValue | ||
) |
Definition at line 1502 of file odbc.c.
References _SQLBindParameter(), SQL_PARAM_INPUT, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLBindParameter | ( | SQLHSTMT | hstmt, |
SQLUSMALLINT | ipar, | ||
SQLSMALLINT | fParamType, | ||
SQLSMALLINT | fCType, | ||
SQLSMALLINT | fSqlType, | ||
SQLULEN | cbColDef, | ||
SQLSMALLINT | ibScale, | ||
SQLPOINTER | rgbValue, | ||
SQLLEN | cbValueMax, | ||
SQLLEN FAR * | pcbValue | ||
) |
Definition at line 1491 of file odbc.c.
References _SQLBindParameter(), TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLCancel | ( | SQLHSTMT | hstmt | ) |
Definition at line 1862 of file odbc.c.
References CHECK_STMT_EXTRA, IS_HSTMT, odbc_errs_reset(), ODBC_EXIT_, ODBC_SAFE_ERROR, odbc_unlock_statement(), SQL_ERROR, SQL_INVALID_HANDLE, SQL_NULL_HSTMT, SQL_SUCCESS, tds_socket::state, stmt, tds, TDS_DBG_FUNC, TDS_FAILED, TDS_IDLE, tds_mutex_lock, tds_mutex_trylock, tds_mutex_unlock, tds_process_cancel, tds_send_cancel, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLCloseCursor | ( | SQLHSTMT | hstmt | ) |
Definition at line 4245 of file odbc.c.
References _SQLFreeStmt(), SQL_CLOSE, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLColAttributes | ( | SQLHSTMT | hstmt, |
SQLUSMALLINT | icol, | ||
SQLUSMALLINT | fDescType, | ||
SQLPOINTER | rgbDesc, | ||
SQLSMALLINT | cbDescMax, | ||
SQLSMALLINT FAR * | pcbDesc, | ||
SQLLEN FAR * | pfDesc | ||
) |
Definition at line 2268 of file odbc.c.
References _SQLColAttribute(), _wide0, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLCopyDesc | ( | SQLHDESC | hsrc, |
SQLHDESC | hdesc | ||
) |
Definition at line 2936 of file odbc.c.
References CHECK_DESC_EXTRA, desc_copy(), DESC_IRD, _hdesc::errs, IRD_UPDATE, IS_HDESC, NULL, ODBC_ENTER_HDESC, odbc_errs_add(), ODBC_EXIT, ODBC_EXIT_, SQL_ERROR, SQL_INVALID_HANDLE, SQL_NULL_HDESC, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLDisconnect | ( | SQLHDBC | hdbc | ) |
Definition at line 2313 of file odbc.c.
References _SQLFreeStmt(), dbc, desc_free(), i, next(), NULL, ODBC_ENTER_HDBC, ODBC_EXIT_, SQL_DROP, stmt, tds_close_socket, TDS_DBG_FUNC, tds_free_socket, TDS_MAX_APP_DESC, tds_mutex_lock, tds_mutex_unlock, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLExecute | ( | SQLHSTMT | hstmt | ) |
Definition at line 3558 of file odbc.c.
References _SQLExecute(), ODBC_ENTER_HSTMT, ODBC_EXIT, odbc_prret, ODBC_PRRET_BUF, SQL_ERROR, SQL_SUCCESS, start_parse_prepared_query(), stmt, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLExtendedFetch | ( | SQLHSTMT | hstmt, |
SQLUSMALLINT | fFetchType, | ||
SQLROWOFFSET | irow, | ||
SQLROWSETSIZE FAR * | pcrow, | ||
SQLUSMALLINT FAR * | rgfRowStatus | ||
) |
Definition at line 695 of file odbc.c.
References _SQLFetch(), NULL, ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT, ODBC_EXIT_, SQL_FETCH_BOOKMARK, SQL_FETCH_NEXT, SQLLEN, SQLULEN, stmt, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLFetch | ( | SQLHSTMT | hstmt | ) |
Definition at line 3997 of file odbc.c.
References _SQLFetch(), NULL, ODBC_ENTER_HSTMT, ODBC_EXIT, SQL_FETCH_NEXT, SQL_OV_ODBC3, SQLULEN, stmt, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLFreeEnv | ( | SQLHENV | henv | ) |
Definition at line 4142 of file odbc.c.
References _SQLFreeEnv(), TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLFreeStmt | ( | SQLHSTMT | hstmt, |
SQLUSMALLINT | fOption | ||
) |
Definition at line 4237 of file odbc.c.
References _SQLFreeStmt(), TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLGetConnectOption | ( | SQLHDBC | hdbc, |
SQLUSMALLINT | fOption, | ||
SQLPOINTER | pvParam | ||
) |
Definition at line 4866 of file odbc.c.
References _SQLGetConnectAttr(), _wide0, NULL, SQL_MAX_OPTION_STRING_LENGTH, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLGetData | ( | SQLHSTMT | hstmt, |
SQLUSMALLINT | icol, | ||
SQLSMALLINT | fCType, | ||
SQLPOINTER | rgbValue, | ||
SQLLEN | cbValueMax, | ||
SQLLEN FAR * | pcbValue | ||
) |
Definition at line 4884 of file odbc.c.
References assert, tds_column::column_cur_size, tds_column::column_data, tds_column::column_size, tds_column::column_text_sqlgetdatapos, tds_column::column_type, tds_result_info::columns, if(), IRD_CHECK, is_fixed_type, is_variable_type, NOT_IN_ROW, NULL, tds_result_info::num_cols, ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT, ODBC_EXIT_, odbc_sql_to_c_type_default(), odbc_tds2sql(), tds_column::on_server, PRE_NORMAL_ROW, SQL_ARD_TYPE, SQL_C_BINARY, SQL_C_CHAR, SQL_C_DEFAULT, SQL_C_WCHAR, SQL_ERROR, SQL_NO_DATA, SQL_NULL_DATA, SQLLEN, stmt, TDS_DBG_FUNC, tds_get_conversion_type, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLGetFunctions | ( | SQLHDBC | hdbc, |
SQLUSMALLINT | fFunction, | ||
SQLUSMALLINT FAR * | pfExists | ||
) |
Definition at line 4981 of file odbc.c.
References dbc, i, ODBC_ENTER_HDBC, ODBC_EXIT, SQL_API_ALL_FUNCTIONS, SQL_API_ODBC3_ALL_FUNCTIONS, SQL_API_ODBC3_ALL_FUNCTIONS_SIZE, SQL_FALSE, SQL_SUCCESS, SQL_TRUE, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLGetInfo | ( | SQLHDBC | hdbc, |
SQLUSMALLINT | fInfoType, | ||
SQLPOINTER | rgbInfoValue, | ||
SQLSMALLINT | cbInfoValueMax, | ||
SQLSMALLINT FAR * | pcbInfoValue | ||
) |
Definition at line 5901 of file odbc.c.
References _SQLGetInfo(), _wide0, dbc, ODBC_ENTER_HDBC, ODBC_EXIT, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLGetStmtOption | ( | SQLHSTMT | hstmt, |
SQLUSMALLINT | fOption, | ||
SQLPOINTER | pvParam | ||
) |
Definition at line 4508 of file odbc.c.
References _SQLGetStmtAttr(), _wide0, NULL, SQL_MAX_OPTION_STRING_LENGTH, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLGetTypeInfo | ( | SQLHSTMT | hstmt, |
SQLSMALLINT | fSqlType | ||
) |
Definition at line 6013 of file odbc.c.
References _SQLExecute(), _wide0, tds_column::column_cur_size, tds_column::column_data, tds_result_info::columns, tds_socket::conn, tds_socket::current_results, if(), is_blob_col, IS_TDS72_PLUS, IS_TDS73_PLUS, n, NULL, ODBC_CHAR, odbc_col_setname(), ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT, odbc_set_stmt_query(), ODBC_SPECIAL_GETTYPEINFO, odbc_swap_datetime_sql_type(), odbc_upper_column_names(), sql, SQL_ERROR, SQL_OV_ODBC3, SQL_SUCCESS, SQL_VARCHAR, stmt, strcat, tds, TDS_CANCELLED, TDS_DBG_FUNC, TDS_IS_MSSQL, TDS_IS_SYBASE, TDS_NO_MORE_RESULTS, tds_process_simple_query, tds_process_tokens, TDS_RETURN_ROW, TDS_ROW_RESULT, TDS_STOPAT_ROWFMT, TDS_SUCCESS, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLMoreResults | ( | SQLHSTMT | hstmt | ) |
Definition at line 865 of file odbc.c.
References AFTER_COMPUTE_ROW, IN_COMPUTE_ROW, IN_NORMAL_ROW, NOT_IN_ROW, NULL, ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT, ODBC_EXIT_, odbc_populate_ird(), odbc_process_tokens(), ODBC_SAFE_ERROR, ODBC_SPECIAL_NONE, odbc_unlock_statement(), PRE_NORMAL_ROW, PRId64, SQL_ERROR, SQL_NO_DATA, SQL_OV_ODBC3, SQL_PARAM_ERROR, SQL_PARAM_SUCCESS, SQL_PARAM_SUCCESS_WITH_INFO, SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, stmt, tds, TDS_CANCELLED, TDS_CMD_DONE, TDS_CMD_FAIL, TDS_COMPUTE_RESULT, TDS_DBG_FUNC, TDS_DBG_INFO1, TDS_DONE_RESULT, TDS_DONEINPROC_RESULT, TDS_DONEPROC_RESULT, TDS_FAILED, tds_free_all_results, TDS_MSG_RESULT, TDS_NO_COUNT, tds_process_tokens, TDS_RETURN_COMPUTE, TDS_RETURN_DONE, TDS_RETURN_MSG, TDS_ROW_RESULT, TDS_ROWFMT_RESULT, TDS_STOPAT_COMPUTE, TDS_STOPAT_ROWFMT, TDS_TOKEN_RESULTS, TDS_TOKEN_TRAILING, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLNumParams | ( | SQLHSTMT | hstmt, |
SQLSMALLINT FAR * | pcpar | ||
) |
Definition at line 1073 of file odbc.c.
References ODBC_ENTER_HSTMT, ODBC_EXIT_, stmt, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLNumResultCols | ( | SQLHSTMT | hstmt, |
SQLSMALLINT FAR * | pccol | ||
) |
Definition at line 4517 of file odbc.c.
References IRD_UPDATE, NOT_IN_ROW, NULL, ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT, ODBC_EXIT_, SQL_ERROR, stmt, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLParamData | ( | SQLHSTMT | hstmt, |
SQLPOINTER FAR * | prgbValue | ||
) |
Definition at line 6175 of file odbc.c.
References _SQLParamData(), odbc_prret, ODBC_PRRET_BUF, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLParamOptions | ( | SQLHSTMT | hstmt, |
SQLULEN | crow, | ||
SQLULEN FAR * | pirow | ||
) |
Definition at line 1082 of file odbc.c.
References _SQLSetStmtAttr(), _wide0, SQL_ATTR_PARAMS_PROCESSED_PTR, SQL_ATTR_PARAMSET_SIZE, SQL_SUCCESS, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLPutData | ( | SQLHSTMT | hstmt, |
SQLPOINTER | rgbValue, | ||
SQLLEN | cbValue | ||
) |
Definition at line 6186 of file odbc.c.
References tds_column::column_cur_size, tds_column::column_size, continue_parse_prepared_query(), NULL, ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT, ODBC_EXIT_, odbc_prret, ODBC_PRRET_BUF, stmt, TDS_DBG_FUNC, and tdsdump_log.
Definition at line 4610 of file odbc.c.
References _SQLRowCount(), TDS_DBG_INFO1, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLSetConnectOption | ( | SQLHDBC | hdbc, |
SQLUSMALLINT | fOption, | ||
SQLULEN | vParam | ||
) |
Definition at line 6375 of file odbc.c.
References _SQLSetConnectAttr(), _wide0, SQL_NTS, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLSetDescRec | ( | SQLHDESC | hdesc, |
SQLSMALLINT | nRecordNumber, | ||
SQLSMALLINT | nType, | ||
SQLSMALLINT | nSubType, | ||
SQLLEN | nLength, | ||
SQLSMALLINT | nPrecision, | ||
SQLSMALLINT | nScale, | ||
SQLPOINTER | pData, | ||
SQLLEN FAR * | pnStringLength, | ||
SQLLEN FAR * | pnIndicator | ||
) |
Definition at line 2428 of file odbc.c.
References DESC_IPD, DESC_IRD, DESC_SET_NEED_REPREPARE, NULL, ODBC_ENTER_HDESC, odbc_errs_add(), ODBC_EXIT_, odbc_get_concise_c_type(), odbc_get_concise_sql_type(), SQL_DATETIME, _drecord::sql_desc_concise_type, _drecord::sql_desc_data_ptr, _drecord::sql_desc_datetime_interval_code, _drecord::sql_desc_indicator_ptr, _drecord::sql_desc_octet_length, _drecord::sql_desc_octet_length_ptr, _drecord::sql_desc_precision, _drecord::sql_desc_scale, _drecord::sql_desc_type, SQL_INTERVAL, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLSetParam | ( | SQLHSTMT | hstmt, |
SQLUSMALLINT | ipar, | ||
SQLSMALLINT | fCType, | ||
SQLSMALLINT | fSqlType, | ||
SQLULEN | cbParamDef, | ||
SQLSMALLINT | ibScale, | ||
SQLPOINTER | rgbValue, | ||
SQLLEN FAR * | pcbValue | ||
) |
Definition at line 4740 of file odbc.c.
References _SQLBindParameter(), SQL_PARAM_INPUT_OUTPUT, SQL_SETPARAM_VALUE_MAX, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLSetPos | ( | SQLHSTMT | hstmt, |
SQLSETPOSIROW | irow, | ||
SQLUSMALLINT | fOption, | ||
SQLUSMALLINT | fLock | ||
) |
Definition at line 1200 of file odbc.c.
References NULL, odbc_build_update_params(), ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT_, odbc_lock_statement(), ODBC_SAFE_ERROR, odbc_unlock_statement(), SQL_ADD, SQL_DELETE, SQL_POSITION, SQL_REFRESH, SQL_UPDATE, stmt, tds, TDS_CURSOR_DELETE, TDS_CURSOR_INSERT, TDS_CURSOR_POSITION, TDS_CURSOR_UPDATE, tds_cursor_update, TDS_DBG_FUNC, TDS_FAILED, tds_free_param_results, tds_process_simple_query, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLSetScrollOptions | ( | SQLHSTMT | hstmt, |
SQLUSMALLINT | fConcurrency, | ||
SQLLEN | crowKeyset, | ||
SQLUSMALLINT | crowRowset | ||
) |
Definition at line 7442 of file odbc.c.
References _SQLGetInfo(), _SQLSetStmtAttr(), _wide0, check, cursor_type, info, NULL, ODBC_ENTER_HSTMT, odbc_errs_add(), ODBC_EXIT_, SQL_ATTR_CONCURRENCY, SQL_ATTR_CURSOR_TYPE, SQL_ATTR_KEYSET_SIZE, SQL_CA2_LOCK_CONCURRENCY, SQL_CA2_OPT_ROWVER_CONCURRENCY, SQL_CA2_OPT_VALUES_CONCURRENCY, SQL_CA2_READ_ONLY_CONCURRENCY, SQL_CONCUR_LOCK, SQL_CONCUR_READ_ONLY, SQL_CONCUR_ROWVER, SQL_CONCUR_VALUES, SQL_CURSOR_DYNAMIC, SQL_CURSOR_FORWARD_ONLY, SQL_CURSOR_KEYSET_DRIVEN, SQL_CURSOR_STATIC, SQL_DYNAMIC_CURSOR_ATTRIBUTES2, SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2, SQL_KEYSET_CURSOR_ATTRIBUTES2, SQL_ROWSET_SIZE, SQL_SCROLL_DYNAMIC, SQL_SCROLL_FORWARD_ONLY, SQL_SCROLL_KEYSET_DRIVEN, SQL_SCROLL_STATIC, SQL_STATIC_CURSOR_ATTRIBUTES2, stmt, TDS_DBG_FUNC, tdsdump_log, and rapidjson::value.
SQLRETURN ODBC_PUBLIC ODBC_API SQLSetStmtOption | ( | SQLHSTMT | hstmt, |
SQLUSMALLINT | fOption, | ||
SQLULEN | vParam | ||
) |
Definition at line 6722 of file odbc.c.
References _SQLSetStmtAttr(), _wide0, SQL_NTS, TDS_DBG_FUNC, and tdsdump_log.
SQLRETURN ODBC_PUBLIC ODBC_API SQLTransact | ( | SQLHENV | henv, |
SQLHDBC | hdbc, | ||
SQLUSMALLINT | fType | ||
) |
Definition at line 4710 of file odbc.c.
References _SQLTransact(), TDS_DBG_FUNC, and tdsdump_log.
|
static |
Definition at line 5927 of file odbc.c.
Referenced by odbc_upper_column_names().