A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/ftds14_2freetds_2freetds_2odbc_8h.html below:

NCBI C++ ToolKit: include/dbapi/driver/ftds14/freetds/freetds/odbc.h File Reference

#include <freetds/tds.h>
#include <freetds/thread.h>
#include <freetds/data.h>
#include <isql.h>
#include <isqlext.h>
#include <wchar.h>
#include <freetds/pushvis.h>
#include <freetds/popvis.h>

Go to the source code of this file.

Go to the SVN repository for this file.

#define  TDS_DONT_DEFINE_DEFAULT_FUNCTIONS   #define  SQLULEN   SQLUINTEGER   #define  SQLLEN   SQLINTEGER   #define  SQLSETPOSIROW   SQLUSMALLINT   #define  SQLROWOFFSET   SQLLEN   #define  SQLROWSETSIZE   SQLULEN   #define  ODBC_API   SQL_API   #define  ODBC_PUBLIC   #define  ODBC_MAX(a, b)   ( (a) > (b) ? (a) : (b) )   #define  ODBC_MIN(a, b)   ( (a) < (b) ? (a) : (b) )   #define  ODBC_CLAMP(x, a, b)   ( (x) < (a) ? (a) : (x) > (b) ? (b) : (x) )   #define  ODBC_RETURN(handle, rc)   #define  ODBC_RETURN_(handle)   #define  ODBC_EXIT(handle, rc)   #define  ODBC_EXIT_(handle)   #define  DESC_IRD   1   #define  DESC_IPD   2   #define  DESC_ARD   3   #define  DESC_APD   4   #define  TDS_MAX_APP_DESC   100   #define  IS_HENV(x)   (((TDS_CHK *)x)->htype == SQL_HANDLE_ENV)   #define  IS_HDBC(x)   (((TDS_CHK *)x)->htype == SQL_HANDLE_DBC)   #define  IS_HSTMT(x)   (((TDS_CHK *)x)->htype == SQL_HANDLE_STMT)   #define  IS_HDESC(x)   (((TDS_CHK *)x)->htype == SQL_HANDLE_DESC)   #define  ODBC_PARAM_LIST   #define  ODBC_PARAM(p)   ODBC_PARAM_##p,   #define  CHECK_ENV_EXTRA(env)   #define  CHECK_DBC_EXTRA(dbc)   #define  CHECK_STMT_EXTRA(stmt)   #define  CHECK_DESC_EXTRA(desc)   #define  _wide   #define  _wide0   #define  _WIDE   #define  ODBC_CHAR   SQLCHAR   #define  odbc_dstr_copy_oct   odbc_dstr_copy   #define  odbc_set_string(dbc, buf, buf_len, out_len, s, s_len)    odbc_set_string_flag(dbc, buf, buf_len, out_len, s, s_len, (sizeof(*(out_len)) == sizeof(SQLSMALLINT)?0:0x10))   #define  odbc_set_string_oct(dbc, buf, buf_len, out_len, s, s_len)    odbc_set_string_flag(dbc, buf, buf_len, out_len, s, s_len, (sizeof(*(out_len)) == sizeof(SQLSMALLINT)?0x20:0x30))   #define  odbc_set_dstr_oct(dbc, buf, buf_len, out_len, s)   odbc_set_string_oct(dbc, buf, buf_len, out_len, tds_dstr_cstr(s), tds_dstr_len(s))   #define  odbc_set_dstr(dbc, buf, buf_len, out_len, s)   odbc_set_string(dbc, buf, buf_len, out_len, tds_dstr_cstr(s), tds_dstr_len(s))   #define  sqlwcslen(s)   wcslen(s)   #define  SQLWSTR_BUFS(n)   do {} while(0)   #define  SQLWSTR(s)   ((const wchar_t*)(s))   #define  SQLWSTR_FREE()   do {} while(0)   enum   TDS_ODBC_ROW_STATUS {
  NOT_IN_ROW , IN_NORMAL_ROW , IN_COMPUTE_ROW , AFTER_COMPUTE_ROW ,
  PRE_NORMAL_ROW , NOT_IN_ROW , IN_NORMAL_ROW , IN_COMPUTE_ROW ,
  AFTER_COMPUTE_ROW , PRE_NORMAL_ROW
}   enum   TDS_ODBC_SPECIAL_ROWS {
  ODBC_SPECIAL_NONE = 0 , ODBC_SPECIAL_GETTYPEINFO = 1 , ODBC_SPECIAL_COLUMNS = 2 , ODBC_SPECIAL_PROCEDURECOLUMNS = 3 ,
  ODBC_SPECIAL_SPECIALCOLUMNS = 4 , ODBC_SPECIAL_NONE = 0 , ODBC_SPECIAL_GETTYPEINFO = 1 , ODBC_SPECIAL_COLUMNS = 2 ,
  ODBC_SPECIAL_PROCEDURECOLUMNS = 3 , ODBC_SPECIAL_SPECIALCOLUMNS = 4
}   enum   {
  ODBC_PARAM_Servername , ODBC_PARAM_Server , ODBC_PARAM_DSN , ODBC_PARAM_UID ,
  ODBC_PARAM_PWD , ODBC_PARAM_Address , ODBC_PARAM_Port , ODBC_PARAM_TDS_Version ,
  ODBC_PARAM_Language , ODBC_PARAM_Database , ODBC_PARAM_TextSize , ODBC_PARAM_PacketSize ,
  ODBC_PARAM_ClientCharset , ODBC_PARAM_DumpFile , ODBC_PARAM_DumpFileAppend , ODBC_PARAM_DebugFlags ,
  ODBC_PARAM_Encryption , ODBC_PARAM_Trusted_Connection , ODBC_PARAM_APP , ODBC_PARAM_WSID ,
  ODBC_PARAM_UseNTLMv2 , ODBC_PARAM_MARS_Connection , ODBC_PARAM_REALM , ODBC_PARAM_ServerSPN ,
  ODBC_PARAM_AttachDbFilename , ODBC_PARAM_ApplicationIntent , ODBC_PARAM_Timeout , ODBC_PARAM_SIZE
}   static void  odbc_check_struct_extra (void *p)   void  odbc_errs_reset (struct _sql_errors *errs)   reset errors More...
  void  odbc_errs_add (struct _sql_errors *errs, const char *sqlstate, const char *msg)   add an error to list More...
  void  odbc_errs_add_rdbms (struct _sql_errors *errs, TDS_UINT native, const char *sqlstate, const char *msg, int linenum, int msgstate, const char *server, int row)   Add an error to list. More...
  bool  odbc_parse_connect_string (TDS_ERRS *errs, const char *connect_string, const char *connect_string_end, TDSLOGIN *login, TDS_PARSED_PARAM *parsed_params)   Parses a connection string for SQLDriverConnect(). More...
  int  odbc_get_dsn_info (TDS_ERRS *errs, const char *DSN, TDSLOGIN *login)   Read connection information from given DSN. More...
  SQLINTEGER  odbc_tds2sql_col (TDS_STMT *stmt, TDSCOLUMN *curcol, int desttype, TDS_CHAR *dest, SQLUINTEGER destlen, const struct _drecord *drec_ixd)   SQLINTEGER  odbc_tds2sql_int4 (TDS_STMT *stmt, TDS_INT *src, int desttype, TDS_CHAR *dest, SQLUINTEGER destlen)   TDS_DESCdesc_alloc (SQLHANDLE parent, int desc_type, SQLSMALLINT alloc_type)   SQLRETURN  desc_free (TDS_DESC *desc)   SQLRETURN  desc_alloc_records (TDS_DESC *desc, unsigned count)   SQLRETURN  desc_copy (TDS_DESC *dest, TDS_DESC *src)   SQLRETURN  desc_free_records (TDS_DESC *desc)   TDS_DBCdesc_get_dbc (TDS_DESC *desc)   SQLTVPtvp_alloc (TDS_STMT *stmt)   void  tvp_free (SQLTVP *tvp)   SQLRETURN  _SQLRowCount (SQLHSTMT hstmt, SQLINTEGER FAR *pcrow)   int  odbc_set_stmt_query (struct _hstmt *stmt, const SQLCHAR *sql, ssize_t sql_len)   void  odbc_set_return_status (struct _hstmt *stmt, unsigned int n_row)   void  odbc_set_return_params (struct _hstmt *stmt, unsigned int n_row)   void  odbc_set_sql_type_info (TDSCOLUMN *col, struct _drecord *drec, SQLINTEGER odbc_ver)   int  odbc_sql_to_c_type_default (int sql_type)   TDS_SERVER_TYPE  odbc_sql_to_server_type (TDSCONNECTION *conn, int sql_type, int sql_unsigned)   TDS_SERVER_TYPE  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. More...
  size_t  odbc_get_string_size (ssize_t size, const SQLCHAR *str)   void  odbc_rdbms_version (TDSSOCKET *tds_socket, char *pversion_string)   Returns the version of the RDBMS in the ODBC format. More...
  SQLINTEGER  odbc_get_param_len (const struct _drecord *drec_axd, const struct _drecord *drec_ixd, const TDS_DESC *axd, SQLUSMALLINT n_row)   DSTRodbc_dstr_copy (TDS_DBC *dbc, DSTR *s, ssize_t size, const SQLCHAR *str)   SQLRETURN  odbc_set_string_flag (TDS_DBC *dbc, SQLPOINTER buffer, SQLINTEGER cbBuffer, void FAR *pcbBuffer, const char *s, ssize_t len, int flag)   Copy a string to client setting size according to ODBC convenction. More...
  SQLSMALLINT  odbc_get_concise_sql_type (SQLSMALLINT type, SQLSMALLINT interval)   SQLRETURN  odbc_set_concise_sql_type (SQLSMALLINT concise_type, struct _drecord *drec, int check_only)   Set concise type and all cascading field. More...
  SQLSMALLINT  odbc_get_concise_c_type (SQLSMALLINT type, SQLSMALLINT interval)   SQLRETURN  odbc_set_concise_c_type (SQLSMALLINT concise_type, struct _drecord *drec, int check_only)   Set concise type and all cascading field. More...
  SQLINTEGER  odbc_get_octet_len (int c_type, const struct _drecord *drec)   void  odbc_convert_err_set (struct _sql_errors *errs, TDS_INT err)   SQLRETURN  prepare_call (struct _hstmt *stmt)   SQLRETURN  native_sql (struct _hdbc *dbc, DSTR *s)   int  parse_prepared_query (struct _hstmt *stmt, bool compute_row)   int  start_parse_prepared_query (struct _hstmt *stmt, bool compute_row)   int  continue_parse_prepared_query (struct _hstmt *stmt, SQLPOINTER DataPtr, SQLINTEGER StrLen_or_Ind)   const char *  parse_const_param (const char *s, TDS_SERVER_TYPE *type)   const char *  odbc_skip_rpc_name (const char *s)   SQLRETURN  odbc_sql2tds (TDS_STMT *stmt, const struct _drecord *drec_ixd, const struct _drecord *drec_axd, TDSCOLUMN *curcol, bool compute_row, const TDS_DESC *axd, SQLUSMALLINT n_row)   TDS_INT  convert_datetime2server (int bindtype, const void *src, TDS_DATETIMEALL *dta)   void  odbc_bcp_free_storage (TDS_DBC *dbc)   void  odbc_bcp_init (TDS_DBC *dbc, const SQLCHAR *tblname, const SQLCHAR *hfile, const SQLCHAR *errfile, int direction)   void  odbc_bcp_control (TDS_DBC *dbc, int field, void *value)   Set BCP options for data transfer. More...
  void  odbc_bcp_colptr (TDS_DBC *dbc, const void *colptr, int table_column)   Override bcp_bind() by pointing to a different host variable. More...
  void  odbc_bcp_sendrow (TDS_DBC *dbc)   Write data in host variables to the table. More...
  int  odbc_bcp_batch (TDS_DBC *dbc)   Commit a set of rows to the table. More...
  int  odbc_bcp_done (TDS_DBC *dbc)   Conclude the transfer of data from program variables. More...
  void  odbc_bcp_bind (TDS_DBC *dbc, const void *varaddr, int prefixlen, int varlen, const void *terminator, int termlen, int vartype, int table_column)   Bind a program host variable to a database column. More...
  int  odbc_get_wide_canonic (TDSCONNECTION *conn)   ◆ _wide ◆ _WIDE ◆ _wide0 ◆ CHECK_DBC_EXTRA #define CHECK_DBC_EXTRA (   dbc )

Definition at line 611 of file odbc.h.

◆ CHECK_DESC_EXTRA #define CHECK_DESC_EXTRA (   desc )

Definition at line 613 of file odbc.h.

◆ CHECK_ENV_EXTRA #define CHECK_ENV_EXTRA (   env )

Definition at line 610 of file odbc.h.

◆ CHECK_STMT_EXTRA #define CHECK_STMT_EXTRA (   stmt )

Definition at line 612 of file odbc.h.

◆ DESC_APD ◆ DESC_ARD ◆ DESC_IPD ◆ DESC_IRD ◆ IS_HDBC ◆ IS_HDESC ◆ IS_HENV ◆ IS_HSTMT ◆ ODBC_API ◆ ODBC_CHAR ◆ ODBC_CLAMP #define ODBC_CLAMP (   x,   a,   b  )    ( (x) < (a) ? (a) : (x) > (b) ? (b) : (x) )

Definition at line 93 of file odbc.h.

◆ odbc_dstr_copy_oct ◆ ODBC_EXIT #define ODBC_EXIT (   handle,   rc  ) Value: do

{

SQLRETURN

_odbc_rc = handle->errs.lastrc = (rc); \

odbc_check_struct_extra(handle); \

tds_mutex_unlock(&handle->mtx); \

return _odbc_rc; } while(0)

Definition at line 130 of file odbc.h.

◆ ODBC_EXIT_ #define ODBC_EXIT_ (   handle ) Value: do

{

SQLRETURN

_odbc_rc = handle->errs.lastrc; \

odbc_check_struct_extra(handle); \

tds_mutex_unlock(&handle->mtx); \

return _odbc_rc; } while(0)

Definition at line 135 of file odbc.h.

◆ ODBC_MAX #define ODBC_MAX (   a,   b  )    ( (a) > (b) ? (a) : (b) )

Definition at line 91 of file odbc.h.

◆ ODBC_MIN #define ODBC_MIN (   a,   b  )    ( (a) < (b) ? (a) : (b) )

Definition at line 92 of file odbc.h.

◆ ODBC_PARAM #define ODBC_PARAM (   p )    ODBC_PARAM_##p,

Definition at line 532 of file odbc.h.

◆ ODBC_PARAM_LIST Value:

ODBC_PARAM(Server) \

ODBC_PARAM(DSN) \

ODBC_PARAM(UID) \

ODBC_PARAM(Address) \

ODBC_PARAM(Port) \

ODBC_PARAM(TDS_Version) \

ODBC_PARAM(Language) \

ODBC_PARAM(Database) \

ODBC_PARAM(TextSize) \

ODBC_PARAM(PacketSize) \

ODBC_PARAM(ClientCharset) \

ODBC_PARAM(DumpFile) \

ODBC_PARAM(DumpFileAppend) \

ODBC_PARAM(DebugFlags) \

ODBC_PARAM(Encryption) \

ODBC_PARAM(Trusted_Connection) \

ODBC_PARAM(APP) \

ODBC_PARAM(WSID) \

ODBC_PARAM(UseNTLMv2) \

ODBC_PARAM(MARS_Connection) \

ODBC_PARAM(REALM) \

ODBC_PARAM(ServerSPN) \

ODBC_PARAM(AttachDbFilename) \

ODBC_PARAM(ApplicationIntent) \

ODBC_PARAM(Timeout)

Definition at line 503 of file odbc.h.

◆ ODBC_PUBLIC ◆ ODBC_RETURN #define ODBC_RETURN (   handle,   rc  ) Value:

return handle->errs.lastrc = (rc); } while(0)

static void odbc_check_struct_extra(void *p)

Definition at line 123 of file odbc.h.

◆ ODBC_RETURN_ #define ODBC_RETURN_ (   handle ) Value:

return handle->errs.lastrc; } while(0)

Definition at line 126 of file odbc.h.

◆ odbc_set_dstr ◆ odbc_set_dstr_oct ◆ odbc_set_string #define odbc_set_string (   dbc,   buf,   buf_len,   out_len,   s,   s_len  )     odbc_set_string_flag(dbc, buf, buf_len, out_len, s, s_len, (sizeof(*(out_len)) == sizeof(SQLSMALLINT)?0:0x10))

Definition at line 675 of file odbc.h.

◆ odbc_set_string_oct #define odbc_set_string_oct (   dbc,   buf,   buf_len,   out_len,   s,   s_len  )     odbc_set_string_flag(dbc, buf, buf_len, out_len, s, s_len, (sizeof(*(out_len)) == sizeof(SQLSMALLINT)?0x20:0x30))

Definition at line 677 of file odbc.h.

◆ SQLLEN ◆ SQLROWOFFSET ◆ SQLROWSETSIZE ◆ SQLSETPOSIROW ◆ SQLULEN ◆ sqlwcslen #define sqlwcslen (   s )    wcslen(s)

Definition at line 740 of file odbc.h.

◆ SQLWSTR #define SQLWSTR (   s )    ((const wchar_t*)(s))

Definition at line 743 of file odbc.h.

◆ SQLWSTR_BUFS #define SQLWSTR_BUFS (   n )    do {} while(0)

Definition at line 742 of file odbc.h.

◆ SQLWSTR_FREE #define SQLWSTR_FREE ( )    do {} while(0)

Definition at line 744 of file odbc.h.

◆ TDS_DONT_DEFINE_DEFAULT_FUNCTIONS #define TDS_DONT_DEFINE_DEFAULT_FUNCTIONS

Definition at line 24 of file odbc.h.

◆ TDS_MAX_APP_DESC #define TDS_MAX_APP_DESC   100

Definition at line 282 of file odbc.h.

◆ TDS_CHK ◆ TDS_DBC ◆ TDS_DESC ◆ TDS_ENV ◆ TDS_ERRS

Definition at line 1 of file odbc.h.

◆ TDS_STMT ◆ anonymous enum Enumerator ODBC_PARAM_Servername  ODBC_PARAM_Server  ODBC_PARAM_DSN  ODBC_PARAM_UID  ODBC_PARAM_PWD  ODBC_PARAM_Address  ODBC_PARAM_Port  ODBC_PARAM_TDS_Version  ODBC_PARAM_Language  ODBC_PARAM_Database  ODBC_PARAM_TextSize  ODBC_PARAM_PacketSize  ODBC_PARAM_ClientCharset  ODBC_PARAM_DumpFile  ODBC_PARAM_DumpFileAppend  ODBC_PARAM_DebugFlags  ODBC_PARAM_Encryption  ODBC_PARAM_Trusted_Connection  ODBC_PARAM_APP  ODBC_PARAM_WSID  ODBC_PARAM_UseNTLMv2  ODBC_PARAM_MARS_Connection  ODBC_PARAM_REALM  ODBC_PARAM_ServerSPN  ODBC_PARAM_AttachDbFilename  ODBC_PARAM_ApplicationIntent  ODBC_PARAM_Timeout  ODBC_PARAM_SIZE 

Definition at line 533 of file odbc.h.

◆ TDS_ODBC_ROW_STATUS Enumerator NOT_IN_ROW  IN_NORMAL_ROW  IN_COMPUTE_ROW  AFTER_COMPUTE_ROW  PRE_NORMAL_ROW  NOT_IN_ROW  IN_NORMAL_ROW  IN_COMPUTE_ROW  AFTER_COMPUTE_ROW  PRE_NORMAL_ROW 

Definition at line 374 of file odbc.h.

◆ TDS_ODBC_SPECIAL_ROWS Enumerator ODBC_SPECIAL_NONE  ODBC_SPECIAL_GETTYPEINFO  ODBC_SPECIAL_COLUMNS  ODBC_SPECIAL_PROCEDURECOLUMNS  ODBC_SPECIAL_SPECIALCOLUMNS  ODBC_SPECIAL_NONE  ODBC_SPECIAL_GETTYPEINFO  ODBC_SPECIAL_COLUMNS  ODBC_SPECIAL_PROCEDURECOLUMNS  ODBC_SPECIAL_SPECIALCOLUMNS 

Definition at line 383 of file odbc.h.

◆ _SQLRowCount() ◆ continue_parse_prepared_query() ◆ convert_datetime2server()

Definition at line 40 of file sql2tds.c.

References TDS_DATETIMEALL::date, tagDATE_STRUCT::day, tagTIMESTAMP_STRUCT::day, tagTIMESTAMP_STRUCT::fraction, gettimeofday(), TDS_DATETIMEALL::has_date, TDS_DATETIMEALL::has_time, tagTIME_STRUCT::hour, tagTIMESTAMP_STRUCT::hour, i, tagTIME_STRUCT::minute, tagTIMESTAMP_STRUCT::minute, tagDATE_STRUCT::month, tagTIMESTAMP_STRUCT::month, NULL, tagTIME_STRUCT::second, tagTIMESTAMP_STRUCT::second, SQL_C_DATE, SQL_C_TIME, SQL_C_TIMESTAMP, SQL_C_TYPE_DATE, SQL_C_TYPE_TIME, SQL_C_TYPE_TIMESTAMP, TDS_CONVERT_FAIL, tds_localtime_r, TDS_DATETIMEALL::time, tagDATE_STRUCT::year, and tagTIMESTAMP_STRUCT::year.

Referenced by odbc_sql2tds().

◆ desc_alloc()

Definition at line 41 of file descriptor.c.

References CHECK_DESC_EXTRA, DESC_APD, DESC_ARD, DESC_IPD, DESC_IRD, free(), _hdesc::header, _hdesc::htype, _hdesc::mtx, NULL, _hdesc::parent, _hdesc::records, SQL_BIND_BY_COLUMN, _dheader::sql_desc_alloc_type, _dheader::sql_desc_array_size, _dheader::sql_desc_bind_type, _dheader::sql_desc_count, SQL_HANDLE_DESC, tds_mutex_init, tds_new0, and _hdesc::type.

◆ desc_alloc_records()

Definition at line 85 of file descriptor.c.

References count, DESC_APD, DESC_ARD, desc_free_record(), DESC_IPD, DESC_IRD, _hdesc::header, i, _hdesc::records, SQL_C_DEFAULT, _drecord::sql_desc_concise_type, _dheader::sql_desc_count, _drecord::sql_desc_parameter_type, SQL_DESC_STRINGS, _drecord::sql_desc_type, SQL_ERROR, SQL_PARAM_INPUT, SQL_SUCCESS, TDS_RESIZE, and _hdesc::type.

Referenced by desc_copy().

◆ desc_copy()

Definition at line 149 of file descriptor.c.

References desc_alloc_records(), desc_free_records(), _hdesc::errs, _hdesc::header, i, NULL, odbc_errs_reset(), _hdesc::records, _dheader::sql_desc_alloc_type, _dheader::sql_desc_count, SQL_DESC_STRINGS, SQL_ERROR, SQL_SUCCESS, and tmp.

◆ desc_free() ◆ desc_free_records() ◆ desc_get_dbc() ◆ native_sql() ◆ odbc_bcp_batch()

Commit a set of rows to the table.

Parameters
dbc ODBC database connection object
Returns
Count of rows saved, or -1 on error.
See also
odbc_bcp_bind(), odbc_bcp_done(), odbc_bcp_sendrow()

Definition at line 278 of file bcp.c.

References dbc, NULL, ODBCBCP_ERROR_DBINT, tds_bcp_done, tds_bcp_start, TDS_DBG_FUNC, TDS_FAILED, and tdsdump_log.

◆ odbc_bcp_bind()

Bind a program host variable to a database column.

Parameters
dbc ODBC database connection object varaddr address of host variable prefixlen length of any prefix found at the beginning of varaddr, in bytes. Use zero for fixed-length datatypes. varlen bytes of data in varaddr. Zero for NULL, -1 for fixed-length datatypes. terminator byte sequence that marks the end of the data in varaddr termlen length of terminator vartype datatype of the host variable table_column Nth column, starting at 1, in the table.
See also
odbc_bcp_batch(), odbc_bcp_done(), odbc_bcp_sendrow()

Definition at line 345 of file bcp.c.

References tds_column::bcp_prefix_len, tds_column::bcp_term_len, tds_column::bcp_terminator, tds_column::column_bindlen, tds_column::column_bindtype, tds_column::column_type, tds_column::column_varaddr, dbc, is_fixed_type, is_tds_type_valid(), NULL, ODBCBCP_ERROR_RETURN, SQL_VARLEN_DATA, SYBBINARY, SYBCHAR, SYBIMAGE, SYBTEXT, TDS_DBG_FUNC, tds_new, TDS_ZERO_FREE, tdsdump_log, and terminator.

◆ odbc_bcp_colptr() void odbc_bcp_colptr ( TDS_DBCdbc, const void *  colptr, int  table_column  ) ◆ odbc_bcp_control() void odbc_bcp_control ( TDS_DBCdbc, int  field, void *  value  )

Set BCP options for data transfer.

Parameters
dbc ODBC database connection object field symbolic constant indicating the option to be set, one of: value The value for field.
See also
odbc_bcp_batch(), odbc_bcp_init(), odbc_bcp_done()

Definition at line 170 of file bcp.c.

References BCPHINTS, BCPKEEPIDENTITY, dbc, NULL, ODBCBCP_ERROR_RETURN, strdup, TDS_DBG_FUNC, tdsdump_log, and rapidjson::value.

◆ odbc_bcp_done()

Conclude the transfer of data from program variables.

Parameters
dbc ODBC database connection object
Returns
As with bcp_batch(), the count of rows saved, or -1 on error.
See also
bcp_batch(), bcp_bind(), bcp_moretext(), bcp_sendrow()

Definition at line 305 of file bcp.c.

References dbc, odbc_bcp_free_storage(), ODBCBCP_ERROR_DBINT, tds_bcp_done, TDS_DBG_FUNC, TDS_FAILED, and tdsdump_log.

◆ odbc_bcp_free_storage() void odbc_bcp_free_storage ( TDS_DBCdbc ) ◆ odbc_bcp_init() ◆ odbc_bcp_sendrow() void odbc_bcp_sendrow ( TDS_DBCdbc )

Write data in host variables to the table.

Parameters
dbc ODBC database connection object
See also
odbc_bcp_batch(), odbc_bcp_bind(), odbc_bcp_colptr(), odbc_bcp_done(), odbc_bcp_init()

Definition at line 236 of file bcp.c.

References _bcp_get_col_data(), dbc, NULL, ODBCBCP_ERROR_RETURN, tds, tds_bcp_send_record, tds_bcp_start_copy_in, TDS_DBG_FUNC, TDS_FAILED, and tdsdump_log.

◆ odbc_check_struct_extra() static void odbc_check_struct_extra ( void *  p ) inlinestatic

Definition at line 120 of file odbc.h.

◆ odbc_dstr_copy() ◆ odbc_errs_add()

add an error to list

Definition at line 382 of file error.c.

References assert, _sql_errors::errs, _sql_errors::lastrc, _sql_error::msg, msg(), n, _sql_error::native, _sql_errors::num_errors, odbc_get_msg(), odbc_get_v2state(), _sql_error::server, SQL_ERROR, SQL_SUCCESS_WITH_INFO, _sql_error::state2, _sql_error::state3, util::strcmp(), strdup, strlcpy, TDS_DBG_FUNC, TDS_RESIZE, and tdsdump_log.

◆ odbc_errs_add_rdbms()

Add an error to list.

This functions is for error that came from server

Definition at line 419 of file error.c.

References _sql_errors::errs, _sql_error::linenum, _sql_error::msg, msg(), _sql_error::msgstate, n, _sql_error::native, _sql_errors::num_errors, odbc_get_msg(), _sql_error::row, row, _sql_error::server, sqlstate2to3(), _sql_error::state2, _sql_error::state3, strdup, strlcpy, and TDS_RESIZE.

◆ odbc_errs_reset()

reset errors

Definition at line 343 of file error.c.

References assert, _sql_errors::errs, free(), i, _sql_errors::lastrc, _sql_error::msg, _sql_errors::num_errors, _sql_errors::ranked, _sql_error::server, SQL_SUCCESS, and TDS_ZERO_FREE.

Referenced by odbc_errs_pop().

◆ odbc_get_dsn_info()

Read connection information from given DSN.

Parameters
DSN DSN name login where to store connection info
Returns
1 if success 0 otherwhise

Definition at line 147 of file connectparams.c.

References tds_login::database, FILENAME_MAX, tds_login::ip_addrs, login, tds_login::mars, myGetPrivateProfileString(), NULL, odbc_errs_add(), parse_server(), tds_login::password, tds_login::server_name, tds_config_boolean, tds_dstr_copy(), tds_dstr_empty, tds_dstr_isempty(), TDS_FAILED, tds_lookup_host_set, tds_parse_conf_section, tds_read_conf_file, TDS_STR_APPENDMODE, TDS_STR_BLKSZ, TDS_STR_CLCHARSET, TDS_STR_DBFILENAME, TDS_STR_DEBUGFLAGS, TDS_STR_DUMPFILE, TDS_STR_ENCRYPTION, TDS_STR_LANGUAGE, TDS_STR_PORT, TDS_STR_REALM, TDS_STR_SPN, TDS_STR_TEXTSZ, TDS_STR_TIMEOUT, TDS_STR_USENTLMV2, TDS_STR_VERSION, tmp, and tds_login::user_name.

Referenced by odbc_parse_connect_string().

◆ odbc_get_param_len() ◆ odbc_get_string_size() ◆ odbc_get_wide_canonic() ◆ odbc_parse_connect_string()

Parses a connection string for SQLDriverConnect().

Parameters
connect_string point to connection string connect_string_end point to end of connection string connection structure where to store informations
Returns
true if error, false otherwise

Parses a connection string for SQLDriverConnect().

Parameters
connect_string connect string connect_string_end connect string end (pointer to char past last) login where to store connection info
Returns
1 if success 0 otherwhise

Parses a connection string for SQLDriverConnect().

Parameters
connect_string connect string connect_string_end connect string end (pointer to char past last) login where to store connection info
Returns
true if success false otherwise

Definition at line 275 of file connectparams.c.

References tds_login::app_name, CHK_PARAM, tds_login::client_host_name, tds_login::database, tds_login::db_filename, DSTR_INITIALIZER, int, TDS_PARSED_PARAM::len, login, tds_login::mars, NULL, odbc_dstr_swap(), odbc_errs_add(), odbc_get_dsn_info(), ODBC_PARAM_ClientCharset, ODBC_PARAM_PWD, ODBC_PARAM_SIZE, ODBC_PARAM_Trusted_Connection, ODBC_PARAM_UID, option, TDS_PARSED_PARAM::p, parse_server(), parse_value(), tds_login::password, PWD, tds_login::server_name, strcasecmp, tds_config_boolean, TDS_DBG_ERROR, TDS_DBG_INFO1, tds_dstr_buf(), tds_dstr_copyn(), tds_dstr_cstr(), tds_dstr_empty, tds_dstr_free(), tds_parse_conf_section, tds_read_conf_file, TDS_STR_APPENDMODE, TDS_STR_BLKSZ, TDS_STR_CLCHARSET, TDS_STR_DEBUGFLAGS, TDS_STR_DUMPFILE, TDS_STR_ENCRYPTION, TDS_STR_LANGUAGE, TDS_STR_PORT, TDS_STR_READONLY_INTENT, TDS_STR_REALM, TDS_STR_SPN, TDS_STR_TEXTSZ, TDS_STR_TIMEOUT, TDS_STR_USENTLMV2, TDS_STR_VERSION, tdsdump_log, tds_login::user_name, and rapidjson::value.

◆ odbc_set_sql_type_info()

Definition at line 390 of file odbc_data.c.

References tds_column::column_prec, tds_column::column_scale, tds_column::column_size, tds_column::funcs, tds_column::on_server, SQL_DATETIME, _drecord::sql_desc_concise_type, _drecord::sql_desc_datetime_interval_code, _drecord::sql_desc_length, _drecord::sql_desc_num_prec_radix, _drecord::sql_desc_octet_length, _drecord::sql_desc_precision, _drecord::sql_desc_scale, _drecord::sql_desc_type, _drecord::sql_desc_unsigned, SQL_FALSE, and SQL_TYPE_TIMESTAMP.

◆ odbc_set_stmt_query() ◆ odbc_skip_rpc_name() ◆ odbc_sql2tds() ◆ odbc_tds2sql_col() ◆ odbc_tds2sql_int4() ◆ parse_const_param()

Definition at line 183 of file native.c.

References isdigit(), isxdigit(), NULL, strncasecmp, SYBFLT8, SYBINT4, SYBINT8, SYBVARBINARY, SYBVARCHAR, tds_skip_quoted, tds_strtoll, and val.

Referenced by prepare_call().

◆ parse_prepared_query() int parse_prepared_query ( struct _hstmtstmt, bool  compute_row  )

Definition at line 199 of file prepare_query.c.

References int, NULL, odbc_errs_add(), odbc_sql2tds(), prepared_rpc(), SQL_ERROR, SQL_NEED_DATA, SQL_SUCCESS, stmt, tds_alloc_param_result, TDS_DBG_FUNC, and tdsdump_log.

◆ prepare_call()

Definition at line 242 of file native.c.

References buf, IS_TDS72_PLUS, memmove, odbc_errs_add(), odbc_skip_rpc_name(), parse_const_param(), SQL_ERROR, SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, stmt, strncasecmp, tds_dstr_buf(), tds_dstr_isempty(), tds_dstr_setlen(), TDS_ISSPACE, to_native(), and type.

◆ start_parse_prepared_query() int start_parse_prepared_query ( struct _hstmtstmt, bool  compute_row  ) ◆ tvp_alloc()

Definition at line 226 of file descriptor.c.

References SQLTVP::apd, desc_alloc(), DESC_APD, DESC_IPD, _hdesc::focus, SQLTVP::ipd, NULL, SQL_DESC_ALLOC_AUTO, stmt, tds_dstr_init(), tds_new0, tvp_free(), and SQLTVP::type_name.

Referenced by _SQLBindParameter().

◆ tvp_free() void tvp_free ( SQLTVPtvp )

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4