51 #define USE_ICONV (tds->conn->use_iconv)
53 #define TDS_GET_COLUMN_TYPE(col) do { \
54 TDS_TINYINT _tds_type = tds_get_byte(tds); \
55 if (!is_tds_type_valid(_tds_type)) \
57 tds_set_column_type(tds->conn, col, (TDS_SERVER_TYPE) _tds_type); \
60 #define TDS_GET_COLUMN_INFO(tds, col) do { \
61 TDSRET _tds_rc = col->funcs->get_info(tds, col); \
62 if (TDS_FAILED(_tds_rc)) \
174 memset(cap, 0, 2*
sizeof(*cap));
179 while (tok_size > 1) {
184 tok_size -= 2 +
size;
193 p = (
unsigned char *) &cap[
type];
309 struct {
unsigned char major, minor, tiny[2];
310 unsigned int reported;
330 ver.reported = (ver.major << 24) | (ver.minor << 16) | (ver.tiny[0] << 8) | ver.tiny[1];
332 if (ver.reported == 0x07010000)
336 switch(ver.reported) {
338 ver.name =
"7.0";
break;
340 ver.name =
"2000";
break;
342 ver.name =
"2000 SP1";
break;
344 ver.name =
"2005";
break;
346 ver.name =
"2008 (no NBCROW or fSparseColumnSet)";
break;
348 ver.name =
"2008";
break;
350 ver.name =
"unknown";
break;
354 ver.major, ver.minor, ver.tiny[0], ver.tiny[1]);
364 if (ver.major >= 7u) {
365 product_version = 0x80000000u;
367 }
else if (ver.major >= 5) {
372 product_version = 0x80000000u;
384 if (ver.major == 4 && ver.minor == 2 && (product_version & 0xff0000ffu) == 0x5f0000ffu)
385 product_version = ((product_version & 0xffff00u) | 0x800000u) << 8;
394 if (ack == 5 || ack == 1) {
425 (succeed ==
TDS_SUCCESS)?
"TDS_SUCCESS" :
"TDS_FAIL");
438 unsigned int pdu_size;
442 #if ENABLE_EXTRA_CHECKS
519 unsigned return_flag = 0;
522 #define SET_RETURN(ret, f) do { \
523 *result_type = ret; \
524 return_flag = TDS_RETURN_##f | TDS_STOPAT_##f; \
525 if (flag & TDS_STOPAT_##f) {\
526 tds_unget_byte(tds); \
527 tdsdump_log(TDS_DBG_FUNC, "tds_process_tokens::SET_RETURN stopping on current token\n"); \
528 goto set_return_exit; \
603 goto set_return_exit;
835 if ((return_flag & flag) != 0) {
910 while (cur !=
NULL) {
938 while (remainder > 0) {
966 remainder -= namelen;
968 remainder -= namelen;
987 int col, num_names = 0;
1010 for (col = 0; col < num_names; ++col) {
1011 curcol =
info->columns[col];
1047 for (col = 0; col <
info->num_cols; col++) {
1048 curcol =
info->columns[col];
1060 TDS_GET_COLUMN_TYPE(curcol);
1065 TDS_GET_COLUMN_INFO(
tds, curcol);
1097 while (remainder > 0) {
1100 char *partials[4], *p;
1117 if (elements <= 0 || elements > 4) {
1124 for (
i = 0;
i < elements; ++
i) {
1126 remainder -= 2 + 2 * namelen;
1129 free(partials[--
i]);
1141 free(partials[--
i]);
1148 for (
i = 0;
i < elements; ++
i) {
1171 int num_names, hdrsize,
i;
1173 unsigned char marker;
1194 for (cur =
head,
i = 0;
i < num_names; ++
i, cur = cur->
next)
1219 unsigned int hdrsize, l;
1222 unsigned int bytes_read = 0;
1223 unsigned char col_info[3];
1231 while (bytes_read < hdrsize) {
1237 if (
info && col_info[0] > 0 && col_info[0] <=
info->num_cols)
1238 curcol =
info->columns[col_info[0] - 1];
1242 curcol->
column_key = (col_info[2] & 0x8) > 0;
1245 if (
names && col_info[1] > 0 && col_info[1] <= num_names)
1250 if (col_info[2] & 0x20) {
1262 bytes_read += l + 1;
1298 curparam =
info->columns[
info->num_cols - 1];
1381 for (
i = 0;
i <
info->num_cols;
i++) {
1399 unsigned int col, num_cols;
1428 tdsdump_log(
TDS_DBG_FUNC,
"logic error: compute_id (%d) from server not found in tds->comp_info\n", compute_id);
1441 for (col = 0; col < num_cols; col++) {
1443 curcol =
info->columns[col];
1456 TDS_GET_COLUMN_TYPE(curcol);
1458 TDS_GET_COLUMN_INFO(
tds, curcol);
1480 info->by_cols = by_cols;
1482 cur_by_col =
info->bycolumns;
1483 for (col = 0; col < by_cols; col++) {
1511 TDS_GET_COLUMN_TYPE(curcol);
1515 TDS_GET_COLUMN_INFO(
tds, curcol);
1531 "\ttype = %d (%s)\n"
1532 "\tserver's type = %d (%s)\n"
1533 "\tcolumn_varint_size = %d\n"
1534 "\tcolumn_size = %d (%d on server)\n",
1585 tdsdump_log(
TDS_DBG_INFO1,
"set current_results (%d column%s) to tds->res_info\n", num_cols, (num_cols==1?
"":
"s"));
1593 for (col = 0; col < num_cols; col++) {
1602 static const char dashes[31] =
"------------------------------";
1606 for (col = 0; col < num_cols; col++) {
1657 enum column_flag_bits_according_to_microsoft {
1658 case_sensitive = 0x0001
1660 , updateable = 0x0004
1661 , might_be_updateable = 0x0008
1664 , us_reserved_odbc = 0x0040 | 0x0080
1665 , is_fixed_len_clr_type = 0x0100
1666 , is_hidden_browse_pk = 0x0200
1667 , is_browse_pk = 0x0400
1668 , might_be_nullable = 0x0800
1672 curcol->is_computed = (curcol->
column_flags & (1 << 4)) > 1;
1673 curcol->us_reserved_odbc1 = (curcol->
column_flags & (1 << 5)) > 1;
1674 curcol->us_reserved_odbc2 = (curcol->
column_flags & (1 << 6)) > 1;
1675 curcol->is_fixed_len_clr_type = (curcol->
column_flags & (1 << 7)) > 1;
1690 curcol->is_nullable_unknown = (curcol->
column_flags & 0x40);
1695 TDS_GET_COLUMN_TYPE(curcol);
1700 TDS_GET_COLUMN_INFO(
tds, curcol);
1720 unsigned int col, num_cols;
1747 for (col = 0; col <
info->num_cols; col++) {
1748 curcol =
info->columns[col];
1770 unsigned int colnamelen;
1808 for (col = 0; col <
info->num_cols; col++) {
1809 curcol =
info->columns[col];
1853 TDS_GET_COLUMN_TYPE(curcol);
1855 TDS_GET_COLUMN_INFO(
tds, curcol);
1908 if (
info->computeid ==
id)
1913 for (
i = 0;
i <
info->num_cols;
i++) {
1914 curcol =
info->columns[
i];
1940 for (
i = 0;
i <
info->num_cols;
i++) {
1942 curcol =
info->columns[
i];
1966 nbcbuf = (
char *)
alloca((
info->num_cols + 7) / 8);
1968 for (
i = 0;
i <
info->num_cols;
i++) {
1969 curcol =
info->columns[
i];
1971 if (nbcbuf[
i / 8] & (1 << (
i % 8))) {
1992 if (feature_id == 0xff)
2019 for (; cursor; cursor = next_cursor) {
2020 next_cursor = cursor->
next;
2041 for (; dyn; dyn = next_dyn) {
2042 next_dyn = dyn->
next;
2072 int more_results, was_cancelled,
error, done_count_valid;
2089 "\t\twas_cancelled = %d\n"
2091 "\t\tdone_count_valid = %d\n", more_results, was_cancelled,
error, done_count_valid);
2109 if (was_cancelled || (!more_results && !
tds->
in_cancel)) {
2132 if (done_count_valid)
2160 if (address_len * 2 <
len)
2162 if (protocol == 0 && port != 0 &&
tds->
login) {
2187 char *oldval =
NULL;
2188 char *newval =
NULL;
2277 new_block_size = atoi(newval);
2278 if (new_block_size >= 512) {
2325 unsigned int len_sqlstate;
2464 }
else if (msg.
msgno) {
2466 "Msg %d, Severity %d, State %d, Server %s, Line %d\n%s\n",
2506 s = (
char*) realloc(s, out_len + 1);
2558 for (curr =
conn->dyns; curr !=
NULL; curr = curr->
next) {
2574 unsigned int token_sz;
2611 unsigned int col, num_cols;
2635 for (col = 0; col <
info->num_cols; col++) {
2636 curcol =
info->columns[col];
2656 unsigned int col, num_cols;
2679 for (col = 0; col <
info->num_cols; col++) {
2680 curcol =
info->columns[col];
2695 TDS_GET_COLUMN_TYPE(curcol);
2697 TDS_GET_COLUMN_INFO(
tds, curcol);
2805 info->computeid = compute_id;
2808 for (col = 0; col < num_cols; col++) {
2832 unsigned int col, num_cols;
2884 info->computeid = compute_id;
2891 cur_by_col =
info->bycolumns;
2892 for (col = 0; col < by_cols; col++) {
2898 for (col = 0; col < num_cols; col++) {
2900 curcol =
info->columns[col];
2938 if (cursor_id == 0){
2949 if (hdrsize ==
sizeof(
TDS_INT))
3022 #define TYPE(con, s) case con: return s; break
3055 #define TYPE(con, s) case con: return s; break
3131 return "TDS5_PARAMFMT2";
3139 return "RETURNSTATUS";
3143 return "TDS7_RESULT";
3145 return "TDS_CURINFO";
3147 return "TDS7_COMPUTE_RESULT";
3159 return "COMPUTE_NAMES";
3161 return "COMPUTE_RESULT";
3173 return "CONTROL/FEATUREEXTACK";
3181 return "TDS5_PARAMS";
3183 return "CAPABILITY";
3187 return "SESSIONSTATE";
3193 return "TDS5_DYNAMIC";
3195 return "TDS5_PARAMFMT";
3205 return "DONEINPROC";
3234 #ifdef WORDS_BIGENDIAN
3235 static const char sybase_utf[] =
"UTF-16BE";
3237 static const char sybase_utf[] =
"UTF-16LE";
3259 "\tServer charset: %s\n"
3260 "\tServer column_size: %d\n"
3261 "\tClient charset: %s\n"
3262 "\tClient column_size: %d\n",
3286 if (
size >= 0x10000000)
3290 if (
size % char_conv->to.charset.min_bytes_per_char)
3291 size += char_conv->to.charset.min_bytes_per_char;
3292 size /= char_conv->to.charset.min_bytes_per_char;
#define TDS_GET_A2BE(ptr)
#define TDS_GET_UA4LE(ptr)
#define CHECK_COLUMN_EXTRA(column)
#define CHECK_TDS_EXTRA(tds)
#define CHECK_CONN_EXTRA(conn)
#define CHECK_PARAMINFO_EXTRA(res_info)
static CS_CONNECTION * conn
static const struct name_t names[]
static DLIST_TYPE *DLIST_NAME() prev(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
static int msg_handler(DBPROCESS *dbproc, DBINT msgno, int msgstate, int severity, char *msgtext, char *srvname, char *procname, int line)
static const char * tds_dstr_cstr(DSTR *s)
Returns a C version (NUL terminated string) of dstr.
DSTR * tds_dstr_dup(DSTR *s, const DSTR *src) TDS_WUR
Duplicate a string from another dynamic string.
DSTR * tds_dstr_copy(DSTR *s, const char *src) TDS_WUR
copy a string from another
static int tds_dstr_isempty(DSTR *s)
test if string is empty
static TDSRET tds7_get_data_info(TDSSOCKET *tds, TDSCOLUMN *curcol)
Reads data information from wire \tds.
const char * tds_prtype(int type)
Returns string representation of the given type.
static void tds_free_namelist(struct namelist *head)
Frees list of names.
static TDSRET tds_process_colinfo(TDSSOCKET *tds, char **names, int num_names)
Reads column information.
static TDSRET tds_process_cursor_tokens(TDSSOCKET *tds)
Reads cursor command results.
static TDSRET tds_process_default_tokens(TDSSOCKET *tds, int marker)
tds_process_default_tokens() is a catch all function that is called to process tokens not known to ot...
static TDSRET tds_process_env_chg(TDSSOCKET *tds)
tds_process_env_chg() when ever certain things change on the server, such as database,...
static TDSRET tds_process_featureextack(TDSSOCKET *tds)
static TDSRET tds_process_dyn_result(TDSSOCKET *tds)
Process results from dynamic.
static TDSRET tds_process_auth(TDSSOCKET *tds)
Process authentication token.
static TDSRET tds_process_col_fmt(TDSSOCKET *tds)
tds_process_col_fmt() is the other half of result set processing under TDS 4.2.
static TDSRET tds5_process_result(TDSSOCKET *tds)
tds5_process_result() is the TDS 5.0 result set processing routine.
TDSDYNAMIC * tds_lookup_dynamic(TDSCONNECTION *conn, const char *id)
Finds a dynamic given string id.
static TDSDYNAMIC * tds_process_dynamic(TDSSOCKET *tds)
tds_process_dynamic() finds the element of the dyns array for the id \tds
static const char * tds_pr_op(int op)
Returns string representation for a given operation.
static TDSRET tds_process_info(TDSSOCKET *tds, int marker)
tds_process_info() is called for INFO, ERR, or EED tokens and is responsible for calling the CLI's me...
static TDSRET tds7_process_compute_result(TDSSOCKET *tds)
tds7_process_compute_result() processes compute result sets for TDS 7/8.
static void tds_process_pending_closes(TDSSOCKET *tds)
Attempt to close all deferred closes (dynamics and cursors).
static TDSRET tds_process_compute(TDSSOCKET *tds)
tds_process_compute() processes compute rows and places them in the row buffer.
static int tds71_read_table_names(TDSSOCKET *tds, int remainder, struct namelist **p_head)
Reads table names for TDS 7.1+.
static TDSRET tds_process_end(TDSSOCKET *tds, int marker, int *flags_parm)
tds_process_end() processes any of the DONE, DONEPROC, or DONEINPROC tokens.
static TDSRET tds_process_params_result_token(TDSSOCKET *tds)
tds_process_params_result_token() processes params on TDS5.
static const char * tds_token_name(unsigned char marker)
Returns string representation for a given token type.
int determine_adjusted_size(const TDSICONV *char_conv, int size)
Allow for maximum possible size of converted data, while being careful about integer division truncat...
static TDSRET tds_process_col_name(TDSSOCKET *tds)
tds_process_col_name() is one half of the result set under TDS 4.2 it contains all the column names,...
static void adjust_character_column_size(TDSSOCKET *tds, TDSCOLUMN *curcol)
Adjust column size according to client's encoding \tds.
static TDSRET tds_process_env_routing(TDSSOCKET *tds)
TDSRET tds_process_login_tokens(TDSSOCKET *tds)
tds_process_login_tokens() is called after sending the login packet to the server.
int tds_get_token_size(int marker)
tds_get_token_size() returns the size of a fixed length token used by tds_process_cancel() to determi...
static TDSRET tds_process_param_result_tokens(TDSSOCKET *tds)
Process parameters from networks.
static TDSRET tds5_process_optioncmd(TDSSOCKET *tds)
Process option cmd results.
static TDSRET tds_process_row(TDSSOCKET *tds)
tds_process_row() processes rows and places them in the row buffer.
static TDSRET tds5_process_result2(TDSSOCKET *tds)
tds5_process_result2() is the new TDS 5.0 result set processing routine.
TDSRET tds_process_tokens(TDSSOCKET *tds, TDS_INT *result_type, int *done_flags, unsigned flag)
process all streams.
static TDSRET tds7_process_result(TDSSOCKET *tds)
tds7_process_result() is the TDS 7.0 result set processing routine.
static TDSRET tds_process_param_result(TDSSOCKET *tds, TDSPARAMINFO **info)
process output parameters of a stored procedure.
static TDSRET tds_get_data_info(TDSSOCKET *tds, TDSCOLUMN *curcol, int is_param)
Reads data metadata from wire.
static TDSRET tds_process_compute_result(TDSSOCKET *tds)
tds_process_compute_result() processes compute result sets.
static TDSRET tds_process_compute_names(TDSSOCKET *tds)
tds_process_compute_names() processes compute result sets.
static TDSRET tds5_process_dyn_result2(TDSSOCKET *tds)
Process new TDS 5.0 token for describing output parameters \tds.
static int tds_read_namelist(TDSSOCKET *tds, int remainder, struct namelist **p_head, int large)
Reads list of names (usually table names) \tds.
TDSRET tds_process_simple_query(TDSSOCKET *tds)
Process results for simple query as "SET TEXTSIZE" or "USE dbname" If the statement returns results,...
static TDSRET tds_process_tabname(TDSSOCKET *tds)
Process list of table from network.
TDSRET tds_process_cancel(TDSSOCKET *tds)
static TDSRET tds_process_nbcrow(TDSSOCKET *tds)
tds_process_nbcrow() processes rows and places them in the row buffer.
static int tds_alloc_get_string(TDSSOCKET *tds, char **string, size_t len)
Reads a string from wire in a new allocated buffer \tds.
if(yy_accept[yy_current_state])
const struct ncbi::grid::netcache::search::fields::SIZE size
int strcmp(const char *str1, const char *str2)
#define TDS_ENV_ROLLBACKTRANS
@ TDS_OPT_INFO
Report current setting of a specific option.
#define TDS_DONEINPROC_TOKEN
#define TDS_COMPUTE_RESULT_TOKEN
#define TDS7_COMPUTE_RESULT_TOKEN
#define TDS_TABNAME_TOKEN
#define TDS_ENV_COMMITTRANS
#define TDS_CURINFO_TOKEN
#define TDS_NBC_ROW_TOKEN
#define TDS_COLNAME_TOKEN
#define TDS5_PARAMFMT_TOKEN
#define TDS_ENVCHANGE_TOKEN
#define TDS_CAPABILITY_TOKEN
#define TDS_LOGINACK_TOKEN
#define TDS_ENV_SQLCOLLATION
#define TDS_OPTIONCMD_TOKEN
#define TDS_ORDERBY_TOKEN
#define TDS5_PARAMS_TOKEN
#define TDS_ORDERBY2_TOKEN
#define TDS_DONEPROC_TOKEN
#define TDS7_RESULT_TOKEN
#define TDS_COMPUTE_NAMES_TOKEN
#define TDS_RETURNSTATUS_TOKEN
#define TDS5_DYNAMIC_TOKEN
#define TDS5_PARAMFMT2_TOKEN
#define TDS_DYNAMIC2_TOKEN
#define TDS_ROWFMT2_TOKEN
#define TDS_CMP_ROW_TOKEN
#define TDS_COLINFO_TOKEN
#define SYBAOPCHECKSUM_AGG
#define TDS_SESSIONSTATE_TOKEN
#define TDS_CONTROL_FEATUREEXTACK_TOKEN
#define TDS_ENV_BEGINTRANS
#define tds_alloc_results
#define tds_submit_unprepare
#define tds_free_param_results
#define tds_free_all_results
#define tds_release_dynamic
#define tds_alloc_lookup_sqlstate
#define tds_dynamic_deallocated
#define tds_alloc_param_result
#define tds_release_cursor
#define tds_set_current_results
#define tds_alloc_compute_results
#define tds_cursor_dealloc
#define tds_get_usmallint
#define tds_alloc_compute_row
#define tds_cursor_deallocated
#define tds7_srv_charset_changed
#define tds_alloc_param_data
#define tds_srv_charset_changed
#define tds_free_param_result
#define tds_realloc_socket
#define tds5_negotiate_set_msg_type
struct namelist * next
next element in the list
TDSRET(* handle_next)(TDSSOCKET *tds, struct tds_authentication *auth, size_t len)
TDSRET(* free)(TDSCONNECTION *conn, struct tds_authentication *auth)
TDS_CAPABILITY_TYPE types[2]
unsigned char values[32/2-2]
tds_func_get_data * get_data
Metadata about columns in regular and compute rows.
TDS_TINYINT column_varint_size
size of length when reading from wire (0, 1, 2 or 4)
TDS_TINYINT column_operator
TDS_INT column_size
maximun size of data.
TDS_SMALLINT column_operand
unsigned int column_timestamp
const TDSCOLUMNFUNCS * funcs
unsigned int column_writeable
unsigned char * column_data
TDS_TINYINT column_prec
precision for decimal/numeric
TDS_SERVER_TYPE column_type
This type can be different from wire type because conversion (e.g.
unsigned int column_identity
unsigned int column_nullable
TDSICONV * char_conv
refers to previously allocated iconv information
TDS_TINYINT column_scale
scale for decimal/numeric
struct tds_column::@124 on_server
TDS_INT column_cur_size
size written in variable (ie: char, text, binary).
unsigned int column_hidden
TDSENV env
environment is shared between all sessions
TDSAUTHENTICATION * authentication
TDSCURSOR * cursors
linked list of cursors allocated for this connection contains only cursors allocated on the server
TDS_UINT product_version
version of product (Sybase/MS and full version)
TDSDYNAMIC * dyns
list of dynamic allocated for this connection contains only dynamic allocated on the server
unsigned int pending_close
true is connection has pending closing (cursors or dynamic)
TDS_CAPABILITIES capabilities
TDS_UCHAR tds72_transaction[8]
Holds informations about a cursor.
TDS_INT ref_count
reference counter so client can retain safely a pointer
TDS_TINYINT defer_close
true if cursor was marker to be closed when connection is idle
TDS_INT cursor_id
cursor id returned by the server after cursor declare
struct tds_cursor * next
next in linked list, keep first
TDS_CURSOR_STATUS status
cursor parameter
Holds information for a dynamic (also called prepared) query.
TDS_TINYINT defer_close
true if dynamic was marker to be closed when connection is idle
TDS_INT ref_count
reference counter so client can retain safely a pointer
char id[30]
id of dynamic.
TDSPARAMINFO * res_info
query results
TDS_TINYINT emulated
this dynamic query cannot be prepared so libTDS have to construct a simple query.
struct tds_dynamic * next
next in linked list, keep first
TDS_INT num_id
numeric id for mssql7+
unsigned char max_bytes_per_char
const char * name
name of the encoding (ie UTF-8)
char * charset
character set encoding
char * database
database name
DSTR server_name
server name (in freetds.conf)
TDS_USMALLINT routing_port
TDS_TINYINT priv_msg_type
Hold information for any results.
Information for a server connection.
TDSLOGIN * login
config for login stuff.
unsigned char * in_buf
Input buffer.
TDSCOMPUTEINFO ** comp_info
TDS_INT ret_status
return status from store procedure
void(* env_chg_func)(TDSSOCKET *tds, int type, char *oldval, char *newval)
TDSRESULTINFO * current_results
Current query information.
TDS_TINYINT has_status
true is ret_status is valid
TDS_INT8 rows_affected
rows updated/deleted/inserted/selected, TDS_NO_COUNT if not valid
TDS_TINYINT bulk_query
true is query sent was a bulk query so we need to switch state to QUERYING
unsigned char out_flag
output buffer type
TDSCURSOR * cur_cursor
cursor in use
bool in_row
true if we are getting rows
TDSPARAMINFO * param_info
volatile unsigned char in_cancel
indicate we are waiting a cancel reply; discard tokens till acknowledge; 1 mean we have to send cance...
TDSDYNAMIC * cur_dyn
dynamic structure in use
struct tdsiconvdir to from
#define SYBMSDATETIMEOFFSET
Main include file for libtds.
#define TDS_IS_MSSQL(x)
Check if product is Microsft SQL Server.
#define TDS_DONEPROC_RESULT
#define TDS_ROWFMT_RESULT
tds_sysdep_int32_type TDS_INT
static void tds_release_cur_dyn(TDSSOCKET *tds)
#define TDS_NO_MORE_RESULTS
#define TDS_COMPUTEFMT_RESULT
#define TDS_OTHERS_RESULT
#define tds_get_smallint(tds)
tds_sysdep_int64_type TDS_INT8
#define TDS_MAX_DYNID_LEN
#define is_unicode_type(x)
#define TDS_DESCRIBE_RESULT
#define TDS_COMPUTE_RESULT
@ TDS_CURSOR_STATE_REQUESTED
unsigned char TDS_TINYINT
@ TDS_PENDING
cilent is waiting for data
@ TDS_SENDING
client would send data
@ TDS_READING
client is reading data
@ TDS_IDLE
no data expected
tds_sysdep_int16_type TDS_SMALLINT
#define tds_new0(type, n)
@ TDS_DONE_CANCELLED
acknowledging an attention command (usually a cancel)
@ TDS_DONE_MORE_RESULTS
more results follow
@ TDS_DONE_ERROR
error occurred
@ TDS_DONE_COUNT
count field in packet is valid
tds_sysdep_uint16_type TDS_USMALLINT
#define TDS_STATUS_RESULT
#define TDS_SYB_VER(maj, min, x)
Calc a version number for Sybase.
tds_sysdep_uint32_type TDS_UINT
#define tds_get_int8(tds)
#define TDS_DONEINPROC_RESULT