FreeTDS API
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tdsodbc.h
1 /* FreeTDS - Library of routines accessing Sybase and Microsoft databases
2  * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Brian Bruns
3  * Copyright (C) 2004, 2005, 2006, 2007 Frediano Ziglio
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20 
21 #ifndef _sql_h_
22 #define _sql_h_
23 
24 #include "tds.h"
25 
26 #if defined(UNIXODBC) || defined(TDS_NO_DM)
27 #include <sql.h>
28 #include <sqlext.h>
29 #ifdef UNIXODBC
30 #include <odbcinst.h>
31 #endif
32 #else /* IODBC */
33 #include <isql.h>
34 #include <isqlext.h>
35 #ifdef HAVE_IODBCINST_H
36 #include <iodbcinst.h>
37 #endif /* HAVE_IODBCINST_H */
38 #endif
39 
40 #ifndef HAVE_SQLLEN
41 #ifndef SQLULEN
42 #define SQLULEN SQLUINTEGER
43 #endif
44 #ifndef SQLLEN
45 #define SQLLEN SQLINTEGER
46 #endif
47 #endif
48 
49 #ifndef HAVE_SQLSETPOSIROW
50 #define SQLSETPOSIROW SQLUSMALLINT
51 #endif
52 
53 #ifndef HAVE_SQLROWOFFSET
54 #define SQLROWOFFSET SQLLEN
55 #endif
56 
57 #ifndef HAVE_SQLROWSETSIZE
58 #define SQLROWSETSIZE SQLULEN
59 #endif
60 
61 #ifdef __cplusplus
62 extern "C"
63 {
64 #if 0
65 }
66 #endif
67 #endif
68 
69 /* $Id: tdsodbc.h,v 1.103.2.1 2008/01/27 10:41:22 freddy77 Exp $ */
70 
71 #if defined(__GNUC__) && __GNUC__ >= 4
72 #pragma GCC visibility push(hidden)
73 #define ODBC_API SQL_API __attribute__((externally_visible))
74 #else
75 #define ODBC_API SQL_API
76 #endif
77 
78 #define ODBC_MAX(a,b) ( (a) > (b) ? (a) : (b) )
79 #define ODBC_MIN(a,b) ( (a) < (b) ? (a) : (b) )
80 
81 struct _sql_error
82 {
83  const char *msg;
84  char state2[6];
85  char state3[6];
86  TDS_UINT native;
87  char *server;
88  int linenum;
89  int msgstate;
90 };
91 
93 {
94  SQLRETURN lastrc;
95  int num_errors;
96  struct _sql_error *errs;
97  char ranked;
98 };
99 
100 #if ENABLE_EXTRA_CHECKS
101 void odbc_check_struct_extra(void *p);
102 
103 #define ODBC_RETURN(handle, rc) \
104  do { odbc_check_struct_extra(handle); return (handle->errs.lastrc = (rc)); } while(0)
105 #define ODBC_RETURN_(handle) \
106  do { odbc_check_struct_extra(handle); return handle->errs.lastrc; } while(0)
107 #else
108 #define ODBC_RETURN(handle, rc) \
109  do { return (handle->errs.lastrc = (rc)); } while(0)
110 #define ODBC_RETURN_(handle) \
111  do { return handle->errs.lastrc; } while(0)
112 #endif
113 
115 void odbc_errs_reset(struct _sql_errors *errs);
116 
118 void odbc_errs_add(struct _sql_errors *errs, const char *sqlstate, const char *msg);
119 
121 void odbc_errs_add_rdbms(struct _sql_errors *errs, TDS_UINT native, const char *sqlstate, const char *msg, int linenum,
122  int msgstate, const char *server);
123 
124 struct _dheader
125 {
126  SQLSMALLINT sql_desc_alloc_type;
127  SQLINTEGER sql_desc_bind_type;
128  SQLULEN sql_desc_array_size;
129  /* TODO SQLLEN ?? see http://support.microsoft.com/default.aspx?scid=kb;en-us;298678 */
130  SQLSMALLINT sql_desc_count;
131  SQLUSMALLINT *sql_desc_array_status_ptr;
132  SQLULEN *sql_desc_rows_processed_ptr;
133  SQLLEN *sql_desc_bind_offset_ptr;
134 };
135 
136 struct _drecord
137 {
138  SQLUINTEGER sql_desc_auto_unique_value;
139  DSTR sql_desc_base_column_name;
140  DSTR sql_desc_base_table_name;
141  SQLINTEGER sql_desc_case_sensitive;
142  DSTR sql_desc_catalog_name;
143  SQLSMALLINT sql_desc_concise_type;
144  SQLPOINTER sql_desc_data_ptr;
145  SQLSMALLINT sql_desc_datetime_interval_code;
146  SQLINTEGER sql_desc_datetime_interval_precision;
147  SQLLEN sql_desc_display_size;
148  SQLSMALLINT sql_desc_fixed_prec_scale;
149  SQLLEN *sql_desc_indicator_ptr;
150  DSTR sql_desc_label;
151  SQLULEN sql_desc_length;
152  /* this point to a constant buffer, do not free or modify */
153  const char *sql_desc_literal_prefix;
154  /* this point to a constant buffer, do not free or modify */
155  const char *sql_desc_literal_suffix;
156  DSTR sql_desc_local_type_name;
157  DSTR sql_desc_name;
158  SQLSMALLINT sql_desc_nullable;
159  SQLINTEGER sql_desc_num_prec_radix;
160  SQLLEN sql_desc_octet_length;
161  SQLLEN *sql_desc_octet_length_ptr;
162  SQLSMALLINT sql_desc_parameter_type;
163  SQLSMALLINT sql_desc_precision;
164  SQLSMALLINT sql_desc_rowver;
165  SQLSMALLINT sql_desc_scale;
166  DSTR sql_desc_schema_name;
167  SQLSMALLINT sql_desc_searchable;
168  DSTR sql_desc_table_name;
169  SQLSMALLINT sql_desc_type;
170  /* this point to a constant buffer, do not free or modify */
171  const char *sql_desc_type_name;
172  SQLSMALLINT sql_desc_unnamed;
173  SQLSMALLINT sql_desc_unsigned;
174  SQLSMALLINT sql_desc_updatable;
175 };
176 
177 struct _hdesc
178 {
179  SQLSMALLINT htype; /* do not reorder this field */
180  int type;
181  SQLHANDLE parent;
182  struct _dheader header;
183  struct _drecord *records;
184  struct _sql_errors errs;
185 };
186 
187 typedef struct _hdesc TDS_DESC;
188 
189 #define DESC_IRD 1
190 #define DESC_IPD 2
191 #define DESC_ARD 3
192 #define DESC_APD 4
193 
194 struct _heattr
195 {
196  SQLUINTEGER connection_pooling;
197  SQLUINTEGER cp_match;
198  SQLINTEGER odbc_version;
199  SQLINTEGER output_nts;
200 };
201 
202 struct _hchk
203 {
204  SQLSMALLINT htype; /* do not reorder this field */
205 };
206 
207 struct _henv
208 {
209  SQLSMALLINT htype; /* do not reorder this field */
210  TDSCONTEXT *tds_ctx;
211  struct _sql_errors errs;
212  struct _heattr attr;
213 };
214 
215 struct _hcattr
216 {
217  SQLUINTEGER access_mode;
218  SQLUINTEGER async_enable;
219  SQLUINTEGER auto_ipd;
220  SQLUINTEGER autocommit;
221  SQLUINTEGER connection_dead;
222  SQLUINTEGER connection_timeout;
223  DSTR current_catalog;
224  SQLUINTEGER login_timeout;
225  SQLUINTEGER metadata_id;
226  SQLUINTEGER odbc_cursors;
227  SQLUINTEGER packet_size;
228  SQLHWND quite_mode;
229  DSTR translate_lib;
230  SQLUINTEGER translate_option;
231  SQLUINTEGER txn_isolation;
232  SQLUINTEGER cursor_type;
233 #ifdef TDS_NO_DM
234  SQLUINTEGER trace;
235  DSTR tracefile;
236 #endif
237 };
238 
239 #define TDS_MAX_APP_DESC 100
240 
241 struct _hstmt;
242 struct _hdbc
243 {
244  SQLSMALLINT htype; /* do not reorder this field */
245  struct _henv *env;
247  DSTR dsn;
248  DSTR server; /* aka Instance */
256  struct _hstmt *stmt_list;
257  struct _sql_errors errs;
258  struct _hcattr attr;
260  TDS_DESC *uad[TDS_MAX_APP_DESC];
262  unsigned int cursor_support;
263  TDS_INT default_query_timeout;
264 };
265 
266 struct _hsattr
267 {
268  /* TODO remove IRD, ARD, IPD, APD from statement, do not duplicate */
269 /* TDS_DESC *app_row_desc; */
270 /* TDS_DESC *app_param_desc; */
271  SQLUINTEGER async_enable;
272  SQLUINTEGER concurrency;
273  SQLUINTEGER cursor_scrollable;
274  SQLUINTEGER cursor_sensitivity;
275  SQLUINTEGER cursor_type;
276  SQLUINTEGER enable_auto_ipd;
277  SQLPOINTER fetch_bookmark_ptr;
278  SQLULEN keyset_size;
279  SQLULEN max_length;
280  SQLULEN max_rows;
281  SQLUINTEGER metadata_id;
282  SQLUINTEGER noscan;
283  /* apd->sql_desc_bind_offset_ptr */
284  /* SQLUINTEGER *param_bind_offset_ptr; */
285  /* apd->sql_desc_bind_type */
286  /* SQLUINTEGER param_bind_type; */
287  /* apd->sql_desc_array_status_ptr */
288  /* SQLUSMALLINT *param_operation_ptr; */
289  /* ipd->sql_desc_array_status_ptr */
290  /* SQLUSMALLINT *param_status_ptr; */
291  /* ipd->sql_desc_rows_processed_ptr */
292  /* SQLUSMALLINT *params_processed_ptr; */
293  /* apd->sql_desc_array_size */
294  /* SQLUINTEGER paramset_size; */
295  SQLUINTEGER query_timeout;
296  SQLUINTEGER retrieve_data;
297  /* ard->sql_desc_bind_offset_ptr */
298  /* SQLUINTEGER *row_bind_offset_ptr; */
299  /* ard->sql_desc_array_size */
300  /* SQLUINTEGER row_array_size; */
301  /* ard->sql_desc_bind_type */
302  /* SQLUINTEGER row_bind_type; */
303  SQLULEN row_number;
304  /* ard->sql_desc_array_status_ptr */
305  /* SQLUINTEGER *row_operation_ptr; */
306  /* ird->sql_desc_array_status_ptr */
307  /* SQLUINTEGER *row_status_ptr; */
308  /* ird->sql_desc_rows_processed_ptr */
309  /* SQLUINTEGER *rows_fetched_ptr; */
310  SQLUINTEGER simulate_cursor;
311  SQLUINTEGER use_bookmarks;
312  /* SQLGetStmtAttr only */
313 /* TDS_DESC *imp_row_desc; */
314 /* TDS_DESC *imp_param_desc; */
315 };
316 
317 typedef enum
318 {
319  NOT_IN_ROW,
320  IN_NORMAL_ROW,
321  IN_COMPUTE_ROW,
322  AFTER_COMPUTE_ROW,
323  PRE_NORMAL_ROW
324 } TDS_ODBC_ROW_STATUS;
325 
326 struct _hstmt
327 {
328  SQLSMALLINT htype; /* do not reorder this field */
329  struct _hdbc *dbc;
331  char *query;
332 
334  struct _hstmt *next;
336  struct _hstmt *prev;
337 
338  /* begin prepared query stuff */
339  char *prepared_query;
340  unsigned prepared_query_is_func:1;
341  unsigned prepared_query_is_rpc:1;
342  unsigned need_reprepare:1;
343  unsigned param_data_called:1;
344  /* end prepared query stuff */
345 
352 
353  unsigned int curr_param_row, num_param_rows;
354 
356  unsigned int param_count;
357  int row;
359  TDS_INT8 row_count;
361  TDS_ODBC_ROW_STATUS row_status;
362  /* do NOT free dynamic, free from socket or attach to connection */
363  TDSDYNAMIC *dyn;
364  struct _sql_errors errs;
365  TDS_DESC *ard, *ird, *apd, *ipd;
366  TDS_DESC *orig_ard, *orig_apd;
367  SQLULEN sql_rowset_size;
368  struct _hsattr attr;
369  DSTR cursor_name; /* auto generated cursor name */
370  int special_row;
371  /* do NOT free cursor, free from socket or attach to connection */
372  TDSCURSOR *cursor;
373  unsigned char cancel_sent;
374 };
375 
376 typedef struct _henv TDS_ENV;
377 typedef struct _hdbc TDS_DBC;
378 typedef struct _hstmt TDS_STMT;
379 typedef struct _hchk TDS_CHK;
380 
381 #define IS_HENV(x) (((TDS_CHK *)x)->htype == SQL_HANDLE_ENV)
382 #define IS_HDBC(x) (((TDS_CHK *)x)->htype == SQL_HANDLE_DBC)
383 #define IS_HSTMT(x) (((TDS_CHK *)x)->htype == SQL_HANDLE_STMT)
384 #define IS_HDESC(x) (((TDS_CHK *)x)->htype == SQL_HANDLE_DESC)
385 
386 /* fix a bug in MingW headers */
387 #ifdef __MINGW32__
388 #if SQL_INTERVAL_YEAR == (100 + SQL_CODE_SECOND)
389 
390 #undef SQL_INTERVAL_YEAR
391 #undef SQL_INTERVAL_MONTH
392 #undef SQL_INTERVAL_DAY
393 #undef SQL_INTERVAL_HOUR
394 #undef SQL_INTERVAL_MINUTE
395 #undef SQL_INTERVAL_SECOND
396 #undef SQL_INTERVAL_YEAR_TO_MONTH
397 #undef SQL_INTERVAL_DAY_TO_HOUR
398 #undef SQL_INTERVAL_DAY_TO_MINUTE
399 #undef SQL_INTERVAL_DAY_TO_SECOND
400 #undef SQL_INTERVAL_HOUR_TO_MINUTE
401 #undef SQL_INTERVAL_HOUR_TO_SECOND
402 #undef SQL_INTERVAL_MINUTE_TO_SECOND
403 
404 #define SQL_INTERVAL_YEAR (100 + SQL_CODE_YEAR)
405 #define SQL_INTERVAL_MONTH (100 + SQL_CODE_MONTH)
406 #define SQL_INTERVAL_DAY (100 + SQL_CODE_DAY)
407 #define SQL_INTERVAL_HOUR (100 + SQL_CODE_HOUR)
408 #define SQL_INTERVAL_MINUTE (100 + SQL_CODE_MINUTE)
409 #define SQL_INTERVAL_SECOND (100 + SQL_CODE_SECOND)
410 #define SQL_INTERVAL_YEAR_TO_MONTH (100 + SQL_CODE_YEAR_TO_MONTH)
411 #define SQL_INTERVAL_DAY_TO_HOUR (100 + SQL_CODE_DAY_TO_HOUR)
412 #define SQL_INTERVAL_DAY_TO_MINUTE (100 + SQL_CODE_DAY_TO_MINUTE)
413 #define SQL_INTERVAL_DAY_TO_SECOND (100 + SQL_CODE_DAY_TO_SECOND)
414 #define SQL_INTERVAL_HOUR_TO_MINUTE (100 + SQL_CODE_HOUR_TO_MINUTE)
415 #define SQL_INTERVAL_HOUR_TO_SECOND (100 + SQL_CODE_HOUR_TO_SECOND)
416 #define SQL_INTERVAL_MINUTE_TO_SECOND (100 + SQL_CODE_MINUTE_TO_SECOND)
417 
418 #endif
419 #endif
420 
421 #ifdef WIN32
422 BOOL get_login_info(HWND hwndParent, TDSCONNECTION * connection);
423 #endif
424 
425 /*
426  * connectparams.h
427  */
435 int odbc_parse_connect_string(const char *connect_string, const char *connect_string_end, TDSCONNECTION * connection);
436 int odbc_get_dsn_info(const char *DSN, TDSCONNECTION * connection);
437 
438 /*
439  * convert_tds2sql.c
440  */
441 TDS_INT convert_tds2sql(TDSCONTEXT * context, int srctype, TDS_CHAR * src, TDS_UINT srclen, int desttype, TDS_CHAR * dest, SQLULEN destlen, const struct _drecord *drec_ixd);
442 
443 /*
444  * descriptor.c
445  */
446 TDS_DESC *desc_alloc(SQLHANDLE parent, int desc_type, int alloc_type);
447 SQLRETURN desc_free(TDS_DESC * desc);
448 SQLRETURN desc_alloc_records(TDS_DESC * desc, unsigned count);
449 SQLRETURN desc_copy(TDS_DESC * dest, TDS_DESC * src);
450 SQLRETURN desc_free_records(TDS_DESC * desc);
451 
452 /*
453  * odbc.c
454  */
455 SQLRETURN _SQLRowCount(SQLHSTMT hstmt, SQLLEN FAR * pcrow);
456 
457 /*
458  * odbc_checks.h
459  */
460 #if ENABLE_EXTRA_CHECKS
461 /* macro */
462 #define CHECK_ENV_EXTRA(env) odbc_check_env_extra(env)
463 #define CHECK_DBC_EXTRA(dbc) odbc_check_dbc_extra(dbc)
464 #define CHECK_STMT_EXTRA(stmt) odbc_check_stmt_extra(stmt)
465 #define CHECK_DESC_EXTRA(desc) odbc_check_desc_extra(desc)
466 /* declarations*/
467 void odbc_check_env_extra(TDS_ENV * env);
468 void odbc_check_dbc_extra(TDS_DBC * dbc);
469 void odbc_check_stmt_extra(TDS_STMT * stmt);
470 void odbc_check_desc_extra(TDS_DESC * desc);
471 #else
472 /* macro */
473 #define CHECK_ENV_EXTRA(env)
474 #define CHECK_DBC_EXTRA(dbc)
475 #define CHECK_STMT_EXTRA(stmt)
476 #define CHECK_DESC_EXTRA(desc)
477 #endif
478 
479 /*
480  * odbc_util.h
481  */
482 int odbc_set_stmt_query(struct _hstmt *stmt, const char *sql, int sql_len);
483 int odbc_set_stmt_prepared_query(struct _hstmt *stmt, const char *sql, int sql_len);
484 void odbc_set_return_status(struct _hstmt *stmt, unsigned int n_row);
485 void odbc_set_return_params(struct _hstmt *stmt, unsigned int n_row);
486 
487 SQLSMALLINT odbc_server_to_sql_type(int col_type, int col_size);
488 int odbc_sql_to_c_type_default(int sql_type);
489 int odbc_sql_to_server_type(TDSSOCKET * tds, int sql_type);
490 int odbc_c_to_server_type(int c_type);
491 
492 void odbc_set_sql_type_info(TDSCOLUMN * col, struct _drecord *drec, SQLINTEGER odbc_ver);
493 SQLINTEGER odbc_sql_to_displaysize(int sqltype, TDSCOLUMN *col);
494 int odbc_get_string_size(int size, SQLCHAR * str);
495 void odbc_rdbms_version(TDSSOCKET * tds_socket, char *pversion_string);
496 SQLINTEGER odbc_get_param_len(const struct _drecord *drec_axd, const struct _drecord *drec_ixd, const TDS_DESC* axd, unsigned int n_row);
497 
498 SQLRETURN odbc_set_string(SQLPOINTER buffer, SQLSMALLINT cbBuffer, SQLSMALLINT FAR * pcbBuffer, const char *s, int len);
499 SQLRETURN odbc_set_string_i(SQLPOINTER buffer, SQLINTEGER cbBuffer, SQLINTEGER FAR * pcbBuffer, const char *s, int len);
500 
501 SQLSMALLINT odbc_get_concise_sql_type(SQLSMALLINT type, SQLSMALLINT interval);
502 SQLRETURN odbc_set_concise_sql_type(SQLSMALLINT concise_type, struct _drecord *drec, int check_only);
503 SQLSMALLINT odbc_get_concise_c_type(SQLSMALLINT type, SQLSMALLINT interval);
504 SQLRETURN odbc_set_concise_c_type(SQLSMALLINT concise_type, struct _drecord *drec, int check_only);
505 
506 SQLLEN odbc_get_octet_len(int c_type, const struct _drecord *drec);
507 
508 /*
509  * prepare_query.c
510  */
511 SQLRETURN prepare_call(struct _hstmt *stmt);
512 SQLRETURN native_sql(struct _hdbc *dbc, char *s);
513 int parse_prepared_query(struct _hstmt *stmt, int compute_row);
514 int start_parse_prepared_query(struct _hstmt *stmt, int compute_row);
515 int continue_parse_prepared_query(struct _hstmt *stmt, SQLPOINTER DataPtr, SQLLEN StrLen_or_Ind);
516 const char *parse_const_param(const char * s, TDS_SERVER_TYPE *type);
517 
518 /*
519  * sql2tds.c
520  */
521 SQLRETURN sql2tds(TDS_STMT * stmt, const struct _drecord *drec_ixd, const struct _drecord *drec_axd, TDSCOLUMN *curcol, int compute_row, const TDS_DESC* axd, unsigned int n_row);
522 
523 #if defined(__GNUC__) && __GNUC__ >= 4
524 #pragma GCC visibility pop
525 #endif
526 
527 #ifdef __cplusplus
528 #if 0
529 {
530 #endif
531 }
532 #endif
533 
534 #endif
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:886
char * query
query to execute
Definition: tdsodbc.h:331
TDS_ODBC_ROW_STATUS row_status
status of row, it can happen that this flag mark that we are still parsing row, this it&#39;s normal ...
Definition: tdsodbc.h:361
Definition: tdsodbc.h:326
int odbc_c_to_server_type(int c_type)
Pass this an SQL_C_* type and get a SYB* type which most closely corresponds to the SQL_C_* type...
Definition: odbc_util.c:374
Definition: tdsodbc.h:81
Definition: tdsodbc.h:124
Definition: tdsodbc.h:177
TDS_DESC * uad[TDS_MAX_APP_DESC]
descriptors associated to connection
Definition: tdsodbc.h:260
SQLRETURN odbc_set_string(SQLPOINTER buffer, SQLSMALLINT cbBuffer, SQLSMALLINT FAR *pcbBuffer, const char *s, int len)
Copy a string to client setting size according to ODBC convenction.
Definition: odbc_util.c:730
struct _hstmt * stmt_list
list of all statements allocated from this connection
Definition: tdsodbc.h:256
int param_num
last valid parameter in params, it&#39;s a ODBC index (from 1 relative to descriptor) ...
Definition: tdsodbc.h:349
Definition: tds.h:1245
struct _hstmt * current_statement
Statement executing.
Definition: tdsodbc.h:254
Definition: tdsodbc.h:266
SQLSMALLINT odbc_server_to_sql_type(int col_type, int col_size)
Convert type from database to ODBC.
Definition: odbc_util.c:253
char * prepared_pos
position in prepared query to check parameters, used only in RPC
Definition: tdsodbc.h:351
unsigned int cursor_support
&lt;&gt;0 if server handle cursors
Definition: tdsodbc.h:262
Hold information for a server connection.
Definition: tds.h:1276
Definition: tdsodbc.h:242
Definition: tdsodbc.h:215
struct _hstmt * next
next in list
Definition: tdsodbc.h:334
Definition: tds.h:67
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:783
struct _hstmt * prev
previous in list
Definition: tdsodbc.h:336
Definition: tdsodbc.h:207
void odbc_rdbms_version(TDSSOCKET *tds, char *pversion_string)
Returns the version of the RDBMS in the ODBC format.
Definition: odbc_util.c:775
Hold information for any results.
Definition: tds.h:1026
Definition: tds.h:847
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:1007
unsigned int param_count
number of parameter in current query
Definition: tdsodbc.h:356
Definition: tdsodbc.h:92
Definition: tdsodbc.h:202
Definition: tdsodbc.h:136
TDSPARAMINFO * params
parameters saved
Definition: tdsodbc.h:347
Main include file for libtds.
TDS_INT8 row_count
row count to return
Definition: tdsodbc.h:359
Metadata about columns in regular and compute rows.
Definition: tds.h:948
Holds information for a dynamic (also called prepared) query.
Definition: tds.h:1199
Holds informations about a cursor.
Definition: tds.h:1163
Definition: tdsodbc.h:194