2 # ODBC_FUNC(SQLTest, (P(SQLSMALLINT, x), PCHAR(y) WIDE))
11 #ifdef ENABLE_ODBC_WIDE
12 # define WIDE , int wide
13 # define PCHAR(a) ODBC_CHAR* a
16 # define PCHAR(a) SQLCHAR* a
20 #define PCHARIN(n,t) PCHAR(sz ## n), P(t, cb ## n)
21 #define PCHAROUT(n,t) PCHAR(sz ## n), P(t, cb ## n ## Max), P(t FAR*, pcb ## n)
23 #define ODBC_FUNC(name, params) \
24 static SQLRETURN _ ## name params
TDS_TINYINT column_prec
precision for decimal/numeric
Definition: tds.h:702
TDS_INT column_size
maximun size of data.
Definition: tds.h:693
this structure is not directed connected to a TDS protocol but keeps any DATE/TIME information.
Definition: tds.h:145
TDS_INT column_cur_size
size written in variable (ie: char, text, binary).
Definition: tds.h:735
void tds_set_param_type(TDSCONNECTION *conn, TDSCOLUMN *curcol, TDS_SERVER_TYPE type)
Set type of column initializing all dependency.
Definition: data.c:246
Metadata about columns in regular and compute rows.
Definition: tds.h:688
TDS_INT date
date, 0 = 1900-01-01
Definition: tds.h:147
TDSICONV * char_conv
refers to previously allocated iconv information
Definition: tds.h:711
Descriptor record.
Definition: odbc.h:165
Information about blobs (e.g.
Definition: tds.h:592
TDS_SERVER_TYPE tds_get_null_type(TDS_SERVER_TYPE srctype)
Get same type but nullable.
Definition: convert.c:2927
char * tds_strndup(const void *s, TDS_INTPTR len)
Copy a string of length len to a new allocated buffer This function does not read more than len bytes...
Definition: util.c:406
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.
Definition: odbc_util.c:867
TDS_INT tds_convert(const TDSCONTEXT *tds_ctx, int srctype, const void *src, TDS_UINT srclen, int desttype, CONV_RESULT *cr)
tds_convert convert a type to another.
Definition: convert.c:1891
void * tds_alloc_param_data(TDSCOLUMN *curparam)
Allocate data for a parameter.
Definition: mem.c:386
TDS_TINYINT column_varint_size
size of length when reading from wire (0, 1, 2 or 4)
Definition: tds.h:700
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.
Definition: odbc_util.c:601
TDS_UINT8 time
time, 7 digit precision
Definition: tds.h:146
SQLRETURN odbc_set_concise_sql_type(SQLSMALLINT concise_type, struct _drecord *drec, int check_only)
Set concise type and all cascading field.
Definition: odbc_util.c:984
static const char * tds_dstr_cstr(const DSTR *s)
Returns a C version (NUL terminated string) of dstr.
Definition: string.h:78
TDS_TINYINT column_scale
scale for decimal/numeric
Definition: tds.h:703
TDSPARAMINFO * tds_alloc_param_result(TDSPARAMINFO *old_param)
Adds a output parameter to TDSPARAMINFO.
Definition: mem.c:284
TDS_SERVER_TYPE column_type
This type can be different from wire type because conversion (e.g.
Definition: tds.h:695
SQLRETURN odbc_set_concise_c_type(SQLSMALLINT concise_type, struct _drecord *drec, int check_only)
Set concise type and all cascading field.
Definition: odbc_util.c:1109
void tdsdump_log(const char *file, unsigned int level_line, const char *fmt,...)
Write a message to the debug log.
Definition: log.c:396
TDSICONV * tds_iconv_get_info(TDSCONNECTION *conn, int canonic_client, int canonic_server)
Get a iconv info structure, allocate and initialize if needed.
Definition: iconv.c:753
Hold information for any results.
Definition: tds.h:768
const int tds_numeric_bytes_per_prec[]
The following little table is indexed by precision and will tell us the number of bytes required to s...
Definition: numeric.c:41