Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > 13eec89779171a321fe518ddb0e0fec6 > files > 180

freetds-doc-0.91-8.mga5.x86_64.rpm

<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>FreeTDS API: /home/jklowden/releases/freetds-0.91/include/tds.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>/home/jklowden/releases/freetds-0.91/include/tds.h</h1><a href="a00159.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* FreeTDS - Library of routines accessing Sybase and Microsoft databases</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005  Brian Bruns</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2010, 2011  Frediano Ziglio</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
<a name="l00006"></a>00006 <span class="comment"> * modify it under the terms of the GNU Library General Public</span>
<a name="l00007"></a>00007 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00008"></a>00008 <span class="comment"> * version 2 of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * This library is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00013"></a>00013 <span class="comment"> * Library General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"> *</span>
<a name="l00015"></a>00015 <span class="comment"> * You should have received a copy of the GNU Library General Public</span>
<a name="l00016"></a>00016 <span class="comment"> * License along with this library; if not, write to the</span>
<a name="l00017"></a>00017 <span class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330,</span>
<a name="l00018"></a>00018 <span class="comment"> * Boston, MA 02111-1307, USA.</span>
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#ifndef _tds_h_</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define _tds_h_</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span>
<a name="l00024"></a>00024 <span class="comment">/* $Id: tds.h,v 1.352.2.4 2011/08/12 16:29:36 freddy77 Exp $ */</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;stdarg.h&gt;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;time.h&gt;</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="preprocessor">#if HAVE_NETINET_IN_H</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#include &lt;netinet/in.h&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#endif </span><span class="comment">/* HAVE_NET_INET_IN_H */</span>
<a name="l00033"></a>00033 <span class="preprocessor">#if HAVE_ARPA_INET_H</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#include &lt;arpa/inet.h&gt;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#endif </span><span class="comment">/* HAVE_ARPA_INET_H */</span>
<a name="l00036"></a>00036 
<a name="l00037"></a>00037 <span class="comment">/* forward declaration */</span>
<a name="l00038"></a>00038 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00130.html">tdsiconvinfo</a> <a class="code" href="a00130.html">TDSICONV</a>;
<a name="l00039"></a>00039 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00122.html" title="Information for a server connection.">tds_socket</a> <a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a>;
<a name="l00040"></a>00040 
<a name="l00041"></a>00041 <span class="preprocessor">#include &quot;tdsver.h&quot;</span>
<a name="l00042"></a>00042 <span class="preprocessor">#include &quot;tds_sysdep_public.h&quot;</span>
<a name="l00043"></a>00043 <span class="preprocessor">#ifdef _FREETDS_LIBRARY_SOURCE</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#include &quot;tds_sysdep_private.h&quot;</span>
<a name="l00045"></a>00045 <span class="preprocessor">#endif </span><span class="comment">/* _FREETDS_LIBRARY_SOURCE */</span>
<a name="l00046"></a>00046 
<a name="l00047"></a>00047 <span class="preprocessor">#if defined(__GNUC__) &amp;&amp; __GNUC__ &gt;= 4 &amp;&amp; !defined(__MINGW32__)</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#pragma GCC visibility push(hidden)</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span>
<a name="l00051"></a>00051 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span>
<a name="l00053"></a>00053 {
<a name="l00054"></a>00054 <span class="preprocessor">#if 0</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span>}
<a name="l00056"></a>00056 <span class="preprocessor">#endif</span>
<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00058"></a>00058 <span class="preprocessor"></span>
<a name="l00064"></a><a class="code" href="a00093.html">00064</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00093.html" title="A structure to hold all the compile-time settings.">tds_compiletime_settings</a>
<a name="l00065"></a>00065 {
<a name="l00066"></a>00066         <span class="keyword">const</span> <span class="keywordtype">char</span> *freetds_version;    <span class="comment">/* release version of FreeTDS */</span>
<a name="l00067"></a>00067         <span class="keyword">const</span> <span class="keywordtype">char</span> *sysconfdir;         <span class="comment">/* location of freetds.conf */</span>
<a name="l00068"></a>00068         <span class="keyword">const</span> <span class="keywordtype">char</span> *last_update;        <span class="comment">/* latest software_version date among the modules */</span>
<a name="l00069"></a>00069         <span class="keywordtype">int</span> msdblib;            <span class="comment">/* for MS style dblib */</span>
<a name="l00070"></a>00070         <span class="keywordtype">int</span> sybase_compat;      <span class="comment">/* enable increased Open Client binary compatibility */</span>
<a name="l00071"></a>00071         <span class="keywordtype">int</span> threadsafe;         <span class="comment">/* compile for thread safety default=no */</span>
<a name="l00072"></a>00072         <span class="keywordtype">int</span> libiconv;           <span class="comment">/* search for libiconv in DIR/include and DIR/lib */</span>
<a name="l00073"></a>00073         <span class="keyword">const</span> <span class="keywordtype">char</span> *tdsver;     <span class="comment">/* TDS protocol version (4.2/4.6/5.0/7.0/8.0) 5.0 */</span>
<a name="l00074"></a>00074         <span class="keywordtype">int</span> iodbc;              <span class="comment">/* build odbc driver against iODBC in DIR */</span>
<a name="l00075"></a>00075         <span class="keywordtype">int</span> unixodbc;           <span class="comment">/* build odbc driver against unixODBC in DIR */</span>
<a name="l00076"></a>00076 
<a name="l00077"></a>00077 } <a class="code" href="a00093.html" title="A structure to hold all the compile-time settings.">TDS_COMPILETIME_SETTINGS</a>;
<a name="l00078"></a>00078 
<a name="l00079"></a><a class="code" href="a00100.html">00079</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00100.html">tds_dstr</a> {
<a name="l00080"></a>00080         <span class="keywordtype">char</span> *dstr_s;
<a name="l00081"></a>00081         <span class="keywordtype">size_t</span> dstr_size;
<a name="l00082"></a>00082 } <a class="code" href="a00100.html">DSTR</a>;
<a name="l00083"></a>00083 
<a name="l00099"></a>00099 <span class="comment">/* </span>
<a name="l00100"></a>00100 <span class="comment"> * All references to data that touch the wire should use the following typedefs.  </span>
<a name="l00101"></a>00101 <span class="comment"> *</span>
<a name="l00102"></a>00102 <span class="comment"> * If you have problems on 64-bit machines and the code is </span>
<a name="l00103"></a>00103 <span class="comment"> * using a native datatype, please change it to use</span>
<a name="l00104"></a>00104 <span class="comment"> * these. (In the TDS layer only, the API layers have their</span>
<a name="l00105"></a>00105 <span class="comment"> * own typedefs which equate to these).</span>
<a name="l00106"></a>00106 <span class="comment"> */</span>
<a name="l00107"></a>00107 <span class="keyword">typedef</span> <span class="keywordtype">char</span> TDS_CHAR;                                  <span class="comment">/*  8-bit char     */</span>
<a name="l00108"></a>00108 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> TDS_UCHAR;                        <span class="comment">/*  8-bit uchar    */</span>
<a name="l00109"></a>00109 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> TDS_TINYINT;                      <span class="comment">/*  8-bit unsigned */</span>
<a name="l00110"></a>00110 <span class="keyword">typedef</span> tds_sysdep_int16_type TDS_SMALLINT;             <span class="comment">/* 16-bit int      */</span>
<a name="l00111"></a>00111 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> tds_sysdep_int16_type TDS_USMALLINT;   <span class="comment">/* 16-bit unsigned */</span>
<a name="l00112"></a>00112 <span class="keyword">typedef</span> tds_sysdep_int32_type TDS_INT;                  <span class="comment">/* 32-bit int      */</span>
<a name="l00113"></a>00113 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> tds_sysdep_int32_type TDS_UINT;        <span class="comment">/* 32-bit unsigned */</span>
<a name="l00114"></a>00114 <span class="keyword">typedef</span> tds_sysdep_real32_type TDS_REAL;                <span class="comment">/* 32-bit real     */</span>
<a name="l00115"></a>00115 <span class="keyword">typedef</span> tds_sysdep_real64_type TDS_FLOAT;               <span class="comment">/* 64-bit real     */</span>
<a name="l00116"></a>00116 <span class="keyword">typedef</span> tds_sysdep_int64_type TDS_INT8;                 <span class="comment">/* 64-bit integer  */</span>
<a name="l00117"></a>00117 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> tds_sysdep_int64_type TDS_UINT8;       <span class="comment">/* 64-bit unsigned */</span>
<a name="l00118"></a>00118 <span class="keyword">typedef</span> tds_sysdep_intptr_type TDS_INTPTR;
<a name="l00119"></a>00119 
<a name="l00120"></a><a class="code" href="a00133.html">00120</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00133.html">tdsnumeric</a>
<a name="l00121"></a>00121 {
<a name="l00122"></a>00122         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> precision;
<a name="l00123"></a>00123         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> scale;
<a name="l00124"></a>00124         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> array[33];
<a name="l00125"></a>00125 } <a class="code" href="a00133.html">TDS_NUMERIC</a>;
<a name="l00126"></a>00126 
<a name="l00127"></a><a class="code" href="a00134.html">00127</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00134.html">tdsoldmoney</a>
<a name="l00128"></a>00128 {
<a name="l00129"></a>00129         TDS_INT mnyhigh;
<a name="l00130"></a>00130         TDS_UINT mnylow;
<a name="l00131"></a>00131 } <a class="code" href="a00134.html">TDS_OLD_MONEY</a>;
<a name="l00132"></a>00132 
<a name="l00133"></a><a class="code" href="a00131.html">00133</a> <span class="keyword">typedef</span> <span class="keyword">union </span><a class="code" href="a00131.html">tdsmoney</a>
<a name="l00134"></a>00134 {
<a name="l00135"></a>00135         <a class="code" href="a00134.html">TDS_OLD_MONEY</a> <a class="code" href="a00134.html">tdsoldmoney</a>;
<a name="l00136"></a>00136         TDS_INT8 mny;
<a name="l00137"></a>00137 } <a class="code" href="a00131.html">TDS_MONEY</a>;
<a name="l00138"></a>00138 
<a name="l00139"></a><a class="code" href="a00132.html">00139</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00132.html">tdsmoney4</a>
<a name="l00140"></a>00140 {
<a name="l00141"></a>00141         TDS_INT mny4;
<a name="l00142"></a>00142 } <a class="code" href="a00132.html">TDS_MONEY4</a>;
<a name="l00143"></a>00143 
<a name="l00144"></a><a class="code" href="a00128.html">00144</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00128.html">tdsdatetime</a>
<a name="l00145"></a>00145 {
<a name="l00146"></a>00146         TDS_INT dtdays;
<a name="l00147"></a>00147         TDS_INT dttime;
<a name="l00148"></a>00148 } <a class="code" href="a00128.html">TDS_DATETIME</a>;
<a name="l00149"></a>00149 
<a name="l00150"></a><a class="code" href="a00129.html">00150</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00129.html">tdsdatetime4</a>
<a name="l00151"></a>00151 {
<a name="l00152"></a>00152         TDS_USMALLINT days;
<a name="l00153"></a>00153         TDS_USMALLINT minutes;
<a name="l00154"></a>00154 } <a class="code" href="a00129.html">TDS_DATETIME4</a>;
<a name="l00155"></a>00155 
<a name="l00156"></a><a class="code" href="a00136.html">00156</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00136.html">tdsvarbinary</a>
<a name="l00157"></a>00157 {
<a name="l00158"></a>00158         TDS_SMALLINT len;
<a name="l00159"></a>00159         TDS_CHAR array[256];
<a name="l00160"></a>00160 } <a class="code" href="a00136.html">TDS_VARBINARY</a>;
<a name="l00161"></a><a class="code" href="a00137.html">00161</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00137.html">tdsvarchar</a>
<a name="l00162"></a>00162 {
<a name="l00163"></a>00163         TDS_SMALLINT len;
<a name="l00164"></a>00164         TDS_CHAR array[256];
<a name="l00165"></a>00165 } <a class="code" href="a00137.html">TDS_VARCHAR</a>;
<a name="l00166"></a>00166 
<a name="l00167"></a><a class="code" href="a00135.html">00167</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00135.html">tdsunique</a>
<a name="l00168"></a>00168 {
<a name="l00169"></a>00169         TDS_UINT Data1;
<a name="l00170"></a>00170         TDS_USMALLINT Data2;
<a name="l00171"></a>00171         TDS_USMALLINT Data3;
<a name="l00172"></a>00172         TDS_UCHAR Data4[8];
<a name="l00173"></a>00173 } <a class="code" href="a00135.html">TDS_UNIQUE</a>;
<a name="l00174"></a>00174 
<a name="l00176"></a><a class="code" href="a00127.html">00176</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00127.html" title="Used by tds_datecrack.">tdsdaterec</a>
<a name="l00177"></a>00177 {
<a name="l00178"></a><a class="code" href="a00127.html#a5a6a5b0180c3db53acbda61dd570d70f">00178</a>         TDS_INT <a class="code" href="a00127.html#a5a6a5b0180c3db53acbda61dd570d70f" title="year">year</a>;          
<a name="l00179"></a><a class="code" href="a00127.html#aa0efc92bb0079287e043bb2c46c4603d">00179</a>         TDS_INT <a class="code" href="a00127.html#aa0efc92bb0079287e043bb2c46c4603d" title="quarter (0-3)">quarter</a>;       
<a name="l00180"></a><a class="code" href="a00127.html#af1542b5698f668f7df650b20fa27c177">00180</a>         TDS_INT <a class="code" href="a00127.html#af1542b5698f668f7df650b20fa27c177" title="month number (0-11)">month</a>;         
<a name="l00181"></a><a class="code" href="a00127.html#a82d0cf263d8d4a3abcf84b9a146ddf83">00181</a>         TDS_INT <a class="code" href="a00127.html#a82d0cf263d8d4a3abcf84b9a146ddf83" title="day of month (1-31)">day</a>;           
<a name="l00182"></a><a class="code" href="a00127.html#a3f7925156708744d28016aacb90b6093">00182</a>         TDS_INT <a class="code" href="a00127.html#a3f7925156708744d28016aacb90b6093" title="day of year (1-366)">dayofyear</a>;     
<a name="l00183"></a><a class="code" href="a00127.html#a9e4b3f442c48ea61dcbbaa6a630d6db2">00183</a>         TDS_INT <a class="code" href="a00127.html#a9e4b3f442c48ea61dcbbaa6a630d6db2" title="1 - 54 (can be 54 in leap year)">week</a>;          
<a name="l00184"></a><a class="code" href="a00127.html#a40de0c7d78e9c1edae4c07435c10192b">00184</a>         TDS_INT <a class="code" href="a00127.html#a40de0c7d78e9c1edae4c07435c10192b" title="day of week (0-6, 0 = sunday)">weekday</a>;       
<a name="l00185"></a><a class="code" href="a00127.html#ae9f0348efe607ac7333eac841be46333">00185</a>         TDS_INT <a class="code" href="a00127.html#ae9f0348efe607ac7333eac841be46333" title="0-23">hour</a>;          
<a name="l00186"></a><a class="code" href="a00127.html#a81d1931139497023deb1bb75dc0aae7a">00186</a>         TDS_INT <a class="code" href="a00127.html#a81d1931139497023deb1bb75dc0aae7a" title="0-59">minute</a>;        
<a name="l00187"></a><a class="code" href="a00127.html#a8560717700de586f279af702bac86ad6">00187</a>         TDS_INT <a class="code" href="a00127.html#a8560717700de586f279af702bac86ad6" title="0-59">second</a>;        
<a name="l00188"></a><a class="code" href="a00127.html#a9658ad3fcec8207d84f32bdb4d9e289d">00188</a>         TDS_INT <a class="code" href="a00127.html#a9658ad3fcec8207d84f32bdb4d9e289d" title="0-999">millisecond</a>;   
<a name="l00189"></a>00189         TDS_INT tzone;
<a name="l00190"></a>00190 } <a class="code" href="a00127.html" title="Used by tds_datecrack.">TDSDATEREC</a>;
<a name="l00191"></a>00191 
<a name="l00197"></a>00197 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">int</span> tds_numeric_bytes_per_prec[];
<a name="l00198"></a>00198 
<a name="l00199"></a>00199 <span class="preprocessor">#define TDS_SUCCEED          1</span>
<a name="l00200"></a>00200 <span class="preprocessor"></span><span class="preprocessor">#define TDS_FAIL             0</span>
<a name="l00201"></a>00201 <span class="preprocessor"></span><span class="preprocessor">#define TDS_NO_MORE_RESULTS  2</span>
<a name="l00202"></a>00202 <span class="preprocessor"></span><span class="preprocessor">#define TDS_CANCELLED        3</span>
<a name="l00203"></a>00203 <span class="preprocessor"></span>
<a name="l00204"></a>00204 <span class="preprocessor">#define TDS_INT_CONTINUE 1</span>
<a name="l00205"></a>00205 <span class="preprocessor"></span><span class="preprocessor">#define TDS_INT_CANCEL 2</span>
<a name="l00206"></a>00206 <span class="preprocessor"></span><span class="preprocessor">#define TDS_INT_TIMEOUT 3</span>
<a name="l00207"></a>00207 <span class="preprocessor"></span>
<a name="l00208"></a>00208 
<a name="l00209"></a>00209 <span class="preprocessor">#define TDS_NO_COUNT         -1</span>
<a name="l00210"></a>00210 <span class="preprocessor"></span>
<a name="l00211"></a>00211 <span class="preprocessor">#define TDS_ROW_RESULT        4040</span>
<a name="l00212"></a>00212 <span class="preprocessor"></span><span class="preprocessor">#define TDS_PARAM_RESULT      4042</span>
<a name="l00213"></a>00213 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STATUS_RESULT     4043</span>
<a name="l00214"></a>00214 <span class="preprocessor"></span><span class="preprocessor">#define TDS_MSG_RESULT        4044</span>
<a name="l00215"></a>00215 <span class="preprocessor"></span><span class="preprocessor">#define TDS_COMPUTE_RESULT    4045</span>
<a name="l00216"></a>00216 <span class="preprocessor"></span><span class="preprocessor">#define TDS_CMD_DONE          4046</span>
<a name="l00217"></a>00217 <span class="preprocessor"></span><span class="preprocessor">#define TDS_CMD_SUCCEED       4047</span>
<a name="l00218"></a>00218 <span class="preprocessor"></span><span class="preprocessor">#define TDS_CMD_FAIL          4048</span>
<a name="l00219"></a>00219 <span class="preprocessor"></span><span class="preprocessor">#define TDS_ROWFMT_RESULT     4049</span>
<a name="l00220"></a>00220 <span class="preprocessor"></span><span class="preprocessor">#define TDS_COMPUTEFMT_RESULT 4050</span>
<a name="l00221"></a>00221 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DESCRIBE_RESULT   4051</span>
<a name="l00222"></a>00222 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DONE_RESULT       4052</span>
<a name="l00223"></a>00223 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DONEPROC_RESULT   4053</span>
<a name="l00224"></a>00224 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DONEINPROC_RESULT 4054</span>
<a name="l00225"></a>00225 <span class="preprocessor"></span><span class="preprocessor">#define TDS_OTHERS_RESULT     4055</span>
<a name="l00226"></a>00226 <span class="preprocessor"></span>
<a name="l00227"></a>00227 <span class="keyword">enum</span> tds_token_results
<a name="l00228"></a>00228 {
<a name="l00229"></a>00229         TDS_TOKEN_RES_OTHERS,
<a name="l00230"></a>00230         TDS_TOKEN_RES_ROWFMT,
<a name="l00231"></a>00231         TDS_TOKEN_RES_COMPUTEFMT,
<a name="l00232"></a>00232         TDS_TOKEN_RES_PARAMFMT,
<a name="l00233"></a>00233         TDS_TOKEN_RES_DONE,
<a name="l00234"></a>00234         TDS_TOKEN_RES_ROW,
<a name="l00235"></a>00235         TDS_TOKEN_RES_COMPUTE,
<a name="l00236"></a>00236         TDS_TOKEN_RES_PROC,
<a name="l00237"></a>00237         TDS_TOKEN_RES_MSG
<a name="l00238"></a>00238 };
<a name="l00239"></a>00239 
<a name="l00240"></a>00240 <span class="preprocessor">#define TDS_TOKEN_FLAG(flag) TDS_RETURN_##flag = (1 &lt;&lt; (TDS_TOKEN_RES_##flag*2)), TDS_STOPAT_##flag = (2 &lt;&lt; (TDS_TOKEN_RES_##flag*2))</span>
<a name="l00241"></a>00241 <span class="preprocessor"></span>
<a name="l00242"></a>00242 <span class="keyword">enum</span> tds_token_flags
<a name="l00243"></a>00243 {
<a name="l00244"></a>00244         TDS_HANDLE_ALL = 0,
<a name="l00245"></a>00245         TDS_TOKEN_FLAG(OTHERS),
<a name="l00246"></a>00246         TDS_TOKEN_FLAG(ROWFMT),
<a name="l00247"></a>00247         TDS_TOKEN_FLAG(COMPUTEFMT),
<a name="l00248"></a>00248         TDS_TOKEN_FLAG(PARAMFMT),
<a name="l00249"></a>00249         TDS_TOKEN_FLAG(DONE),
<a name="l00250"></a>00250         TDS_TOKEN_FLAG(ROW),
<a name="l00251"></a>00251         TDS_TOKEN_FLAG(COMPUTE),
<a name="l00252"></a>00252         TDS_TOKEN_FLAG(PROC),
<a name="l00253"></a>00253         TDS_TOKEN_FLAG(MSG),
<a name="l00254"></a>00254         TDS_TOKEN_RESULTS = TDS_RETURN_ROWFMT|TDS_RETURN_COMPUTEFMT|TDS_RETURN_DONE|TDS_STOPAT_ROW|TDS_STOPAT_COMPUTE|TDS_RETURN_PROC,
<a name="l00255"></a>00255         TDS_TOKEN_TRAILING = TDS_STOPAT_ROWFMT|TDS_STOPAT_COMPUTEFMT|TDS_STOPAT_ROW|TDS_STOPAT_COMPUTE|TDS_STOPAT_MSG|TDS_STOPAT_OTHERS
<a name="l00256"></a>00256 };
<a name="l00257"></a>00257 
<a name="l00261"></a><a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519c">00261</a> <span class="keyword">enum</span> <a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519c" title="Flags returned in TDS_DONE token.">tds_end</a>
<a name="l00262"></a>00262 {
<a name="l00263"></a><a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519ca7ed9046db24ad78bb94c2b12d6e11f46">00263</a>           <a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519ca7ed9046db24ad78bb94c2b12d6e11f46" title="final result set, command completed successfully.">TDS_DONE_FINAL</a>        = 0x00  
<a name="l00264"></a><a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519ca688b8bf555ce6ae72f3e047177bfc966">00264</a>         , <a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519ca688b8bf555ce6ae72f3e047177bfc966" title="more results follow">TDS_DONE_MORE_RESULTS</a> = 0x01  
<a name="l00265"></a><a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519caa9d79a3b62e3321332223ac3d1a5b18d">00265</a>         , <a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519caa9d79a3b62e3321332223ac3d1a5b18d" title="error occurred">TDS_DONE_ERROR</a>        = 0x02  
<a name="l00266"></a><a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519cac79a30d1a0bac125e77d87f5d87bc2b2">00266</a>         , <a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519cac79a30d1a0bac125e77d87f5d87bc2b2" title="transaction in progress">TDS_DONE_INXACT</a>       = 0x04  
<a name="l00267"></a><a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519cae170f368306f421d507c6f08e4d48d9a">00267</a>         , <a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519cae170f368306f421d507c6f08e4d48d9a" title="results are from a stored procedure">TDS_DONE_PROC</a>         = 0x08  
<a name="l00268"></a><a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519caf17d0c6591e318014c806a10c2f0270b">00268</a>         , <a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519caf17d0c6591e318014c806a10c2f0270b" title="count field in packet is valid">TDS_DONE_COUNT</a>        = 0x10  
<a name="l00269"></a><a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519ca202254cfd6784404cf1aa22bc7147c86">00269</a>         , <a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519ca202254cfd6784404cf1aa22bc7147c86" title="acknowledging an attention command (usually a cancel)">TDS_DONE_CANCELLED</a>    = 0x20  
<a name="l00270"></a>00270         , TDS_DONE_EVENT        = 0x40  <span class="comment">/*   part of an event notification. */</span>
<a name="l00271"></a><a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519ca7bfe89d6f8fc309eae412ad0a503e34c">00271</a>         , <a class="code" href="a00159.html#aa8d8044be84bcde003f28ec25a77519ca7bfe89d6f8fc309eae412ad0a503e34c" title="SQL server server error.">TDS_DONE_SRVERROR</a>     = 0x100 
<a name="l00273"></a>00273         <span class="comment">/* after the above flags, a TDS_DONE packet has a field describing the state of the transaction */</span>
<a name="l00274"></a>00274         , TDS_DONE_NO_TRAN      = 0     <span class="comment">/* No transaction in effect */</span>
<a name="l00275"></a>00275         , TDS_DONE_TRAN_SUCCEED = 1     <span class="comment">/* Transaction completed successfully */</span>
<a name="l00276"></a>00276         , TDS_DONE_TRAN_PROGRESS= 2     <span class="comment">/* Transaction in progress */</span>
<a name="l00277"></a>00277         , TDS_DONE_STMT_ABORT   = 3     <span class="comment">/* A statement aborted */</span>
<a name="l00278"></a>00278         , TDS_DONE_TRAN_ABORT   = 4     <span class="comment">/* Transaction aborted */</span>
<a name="l00279"></a>00279 };
<a name="l00280"></a>00280 
<a name="l00281"></a>00281 
<a name="l00282"></a>00282 <span class="comment">/*</span>
<a name="l00283"></a>00283 <span class="comment"> * TDSERRNO is emitted by libtds to the client library&#39;s error handler</span>
<a name="l00284"></a>00284 <span class="comment"> * (which may in turn call the client&#39;s error handler).</span>
<a name="l00285"></a>00285 <span class="comment"> * These match the db-lib msgno, because the same values have the same meaning</span>
<a name="l00286"></a>00286 <span class="comment"> * in db-lib and ODBC.  ct-lib maps them to ct-lib numbers (todo). </span>
<a name="l00287"></a>00287 <span class="comment"> */</span>
<a name="l00288"></a>00288 <span class="keyword">typedef</span> <span class="keyword">enum</span> {  TDSEOK    = TDS_SUCCEED, 
<a name="l00289"></a>00289                 TDSEVERDOWN    =  100,
<a name="l00290"></a>00290                 TDSEICONVIU    = 2400, 
<a name="l00291"></a>00291                 TDSEICONVAVAIL = 2401, 
<a name="l00292"></a>00292                 TDSEICONVO     = 2402, 
<a name="l00293"></a>00293                 TDSEICONVI     = 2403, 
<a name="l00294"></a>00294                 TDSEICONV2BIG  = 2404,
<a name="l00295"></a>00295                 TDSEPORTINSTANCE        = 2500,
<a name="l00296"></a>00296                 TDSESYNC = 20001, 
<a name="l00297"></a>00297                 TDSEFCON = 20002, 
<a name="l00298"></a>00298                 TDSETIME = 20003, 
<a name="l00299"></a>00299                 TDSEREAD = 20004, 
<a name="l00300"></a>00300                 TDSEWRIT = 20006, 
<a name="l00301"></a>00301                 TDSESOCK = 20008, 
<a name="l00302"></a>00302                 TDSECONN = 20009, 
<a name="l00303"></a>00303                 TDSEMEM  = 20010,
<a name="l00304"></a>00304                 TDSEINTF = 20012,       <span class="comment">/* Server name not found in interface file */</span>
<a name="l00305"></a>00305                 TDSEUHST = 20013,       <span class="comment">/* Unknown host machine name. */</span>
<a name="l00306"></a>00306                 TDSEPWD  = 20014, 
<a name="l00307"></a>00307                 TDSESEOF = 20017, 
<a name="l00308"></a>00308                 TDSERPND = 20019, 
<a name="l00309"></a>00309                 TDSEBTOK = 20020, 
<a name="l00310"></a>00310                 TDSEOOB  = 20022, 
<a name="l00311"></a>00311                 TDSECLOS = 20056,
<a name="l00312"></a>00312                 TDSEUSCT = 20058, 
<a name="l00313"></a>00313                 TDSEUTDS = 20146, 
<a name="l00314"></a>00314                 TDSEEUNR = 20185, 
<a name="l00315"></a>00315                 TDSECAP  = 20203, 
<a name="l00316"></a>00316                 TDSENEG  = 20210, 
<a name="l00317"></a>00317                 TDSEUMSG = 20212, 
<a name="l00318"></a>00318                 TDSECAPTYP  = 20213, 
<a name="l00319"></a>00319                 TDSEBPROBADTYP = 20250,
<a name="l00320"></a>00320                 TDSECLOSEIN = 20292 
<a name="l00321"></a>00321 } TDSERRNO;
<a name="l00322"></a>00322 
<a name="l00323"></a>00323 <span class="preprocessor">#define TDS5_PARAMFMT2_TOKEN       32   </span><span class="comment">/* 0x20 */</span>
<a name="l00324"></a>00324 <span class="preprocessor">#define TDS_LANGUAGE_TOKEN         33   </span><span class="comment">/* 0x21    TDS 5.0 only              */</span>
<a name="l00325"></a>00325 <span class="preprocessor">#define TDS_ORDERBY2_TOKEN         34   </span><span class="comment">/* 0x22 */</span>
<a name="l00326"></a>00326 <span class="preprocessor">#define TDS_ROWFMT2_TOKEN          97   </span><span class="comment">/* 0x61    TDS 5.0 only              */</span>
<a name="l00327"></a>00327 <span class="preprocessor">#define TDS_LOGOUT_TOKEN          113   </span><span class="comment">/* 0x71    TDS 5.0 only? ct_close()  */</span>
<a name="l00328"></a>00328 <span class="preprocessor">#define TDS_RETURNSTATUS_TOKEN    121   </span><span class="comment">/* 0x79                              */</span>
<a name="l00329"></a>00329 <span class="preprocessor">#define TDS_PROCID_TOKEN          124   </span><span class="comment">/* 0x7C    TDS 4.2 only - TDS_PROCID */</span>
<a name="l00330"></a>00330 <span class="preprocessor">#define TDS7_RESULT_TOKEN         129   </span><span class="comment">/* 0x81    TDS 7.0 only              */</span>
<a name="l00331"></a>00331 <span class="preprocessor">#define TDS7_COMPUTE_RESULT_TOKEN 136   </span><span class="comment">/* 0x88    TDS 7.0 only              */</span>
<a name="l00332"></a>00332 <span class="preprocessor">#define TDS_COLNAME_TOKEN         160   </span><span class="comment">/* 0xA0    TDS 4.2 only              */</span>
<a name="l00333"></a>00333 <span class="preprocessor">#define TDS_COLFMT_TOKEN          161   </span><span class="comment">/* 0xA1    TDS 4.2 only - TDS_COLFMT */</span>
<a name="l00334"></a>00334 <span class="preprocessor">#define TDS_DYNAMIC2_TOKEN        163   </span><span class="comment">/* 0xA3 */</span>
<a name="l00335"></a>00335 <span class="preprocessor">#define TDS_TABNAME_TOKEN         164   </span><span class="comment">/* 0xA4 */</span>
<a name="l00336"></a>00336 <span class="preprocessor">#define TDS_COLINFO_TOKEN         165   </span><span class="comment">/* 0xA5 */</span>
<a name="l00337"></a>00337 <span class="preprocessor">#define TDS_OPTIONCMD_TOKEN       166   </span><span class="comment">/* 0xA6 */</span>
<a name="l00338"></a>00338 <span class="preprocessor">#define TDS_COMPUTE_NAMES_TOKEN   167   </span><span class="comment">/* 0xA7 */</span>
<a name="l00339"></a>00339 <span class="preprocessor">#define TDS_COMPUTE_RESULT_TOKEN  168   </span><span class="comment">/* 0xA8 */</span>
<a name="l00340"></a>00340 <span class="preprocessor">#define TDS_ORDERBY_TOKEN         169   </span><span class="comment">/* 0xA9    TDS_ORDER                 */</span>
<a name="l00341"></a>00341 <span class="preprocessor">#define TDS_ERROR_TOKEN           170   </span><span class="comment">/* 0xAA                              */</span>
<a name="l00342"></a>00342 <span class="preprocessor">#define TDS_INFO_TOKEN            171   </span><span class="comment">/* 0xAB                              */</span>
<a name="l00343"></a>00343 <span class="preprocessor">#define TDS_PARAM_TOKEN           172   </span><span class="comment">/* 0xAC    RETURNVALUE?              */</span>
<a name="l00344"></a>00344 <span class="preprocessor">#define TDS_LOGINACK_TOKEN        173   </span><span class="comment">/* 0xAD                              */</span>
<a name="l00345"></a>00345 <span class="preprocessor">#define TDS_CONTROL_TOKEN         174   </span><span class="comment">/* 0xAE    TDS_CONTROL               */</span>
<a name="l00346"></a>00346 <span class="preprocessor">#define TDS_ROW_TOKEN             209   </span><span class="comment">/* 0xD1                              */</span>
<a name="l00347"></a>00347 <span class="preprocessor">#define TDS_NBC_ROW_TOKEN         210   </span><span class="comment">/* 0xD2    as of TDS 7.3.B           */</span> <span class="comment">/* not implemented */</span>
<a name="l00348"></a>00348 <span class="preprocessor">#define TDS_CMP_ROW_TOKEN         211   </span><span class="comment">/* 0xD3                              */</span>
<a name="l00349"></a>00349 <span class="preprocessor">#define TDS5_PARAMS_TOKEN         215   </span><span class="comment">/* 0xD7    TDS 5.0 only              */</span>
<a name="l00350"></a>00350 <span class="preprocessor">#define TDS_CAPABILITY_TOKEN      226   </span><span class="comment">/* 0xE2                              */</span>
<a name="l00351"></a>00351 <span class="preprocessor">#define TDS_ENVCHANGE_TOKEN       227   </span><span class="comment">/* 0xE3                              */</span>
<a name="l00352"></a>00352 <span class="preprocessor">#define TDS_EED_TOKEN             229   </span><span class="comment">/* 0xE5                              */</span>
<a name="l00353"></a>00353 <span class="preprocessor">#define TDS_DBRPC_TOKEN           230   </span><span class="comment">/* 0xE6                              */</span>
<a name="l00354"></a>00354 <span class="preprocessor">#define TDS5_DYNAMIC_TOKEN        231   </span><span class="comment">/* 0xE7    TDS 5.0 only              */</span>
<a name="l00355"></a>00355 <span class="preprocessor">#define TDS5_PARAMFMT_TOKEN       236   </span><span class="comment">/* 0xEC    TDS 5.0 only              */</span>
<a name="l00356"></a>00356 <span class="preprocessor">#define TDS_AUTH_TOKEN            237   </span><span class="comment">/* 0xED    TDS 7.0 only              */</span>
<a name="l00357"></a>00357 <span class="preprocessor">#define TDS_RESULT_TOKEN          238   </span><span class="comment">/* 0xEE                              */</span>
<a name="l00358"></a>00358 <span class="preprocessor">#define TDS_DONE_TOKEN            253   </span><span class="comment">/* 0xFD    TDS_DONE                  */</span>
<a name="l00359"></a>00359 <span class="preprocessor">#define TDS_DONEPROC_TOKEN        254   </span><span class="comment">/* 0xFE    TDS_DONEPROC              */</span>
<a name="l00360"></a>00360 <span class="preprocessor">#define TDS_DONEINPROC_TOKEN      255   </span><span class="comment">/* 0xFF    TDS_DONEINPROC            */</span>
<a name="l00361"></a>00361 
<a name="l00362"></a>00362 <span class="comment">/* CURSOR support: TDS 5.0 only*/</span>
<a name="l00363"></a>00363 <span class="preprocessor">#define TDS_CURCLOSE_TOKEN        128  </span><span class="comment">/* 0x80    TDS 5.0 only              */</span>
<a name="l00364"></a>00364 <span class="preprocessor">#define TDS_CURDELETE_TOKEN       129  </span><span class="comment">/* 0x81    TDS 5.0 only              */</span>
<a name="l00365"></a>00365 <span class="preprocessor">#define TDS_CURFETCH_TOKEN        130  </span><span class="comment">/* 0x82    TDS 5.0 only              */</span>
<a name="l00366"></a>00366 <span class="preprocessor">#define TDS_CURINFO_TOKEN         131  </span><span class="comment">/* 0x83    TDS 5.0 only              */</span>
<a name="l00367"></a>00367 <span class="preprocessor">#define TDS_CUROPEN_TOKEN         132  </span><span class="comment">/* 0x84    TDS 5.0 only              */</span>
<a name="l00368"></a>00368 <span class="preprocessor">#define TDS_CURDECLARE_TOKEN      134  </span><span class="comment">/* 0x86    TDS 5.0 only              */</span>
<a name="l00369"></a>00369 
<a name="l00370"></a>00370 <span class="keyword">enum</span> {
<a name="l00371"></a>00371         TDS_CUR_ISTAT_UNUSED    = 0x00,
<a name="l00372"></a>00372         TDS_CUR_ISTAT_DECLARED  = 0x01,
<a name="l00373"></a>00373         TDS_CUR_ISTAT_OPEN      = 0x02,
<a name="l00374"></a>00374         TDS_CUR_ISTAT_CLOSED    = 0x04,
<a name="l00375"></a>00375         TDS_CUR_ISTAT_RDONLY    = 0x08,
<a name="l00376"></a>00376         TDS_CUR_ISTAT_UPDATABLE = 0x10,
<a name="l00377"></a>00377         TDS_CUR_ISTAT_ROWCNT    = 0x20,
<a name="l00378"></a>00378         TDS_CUR_ISTAT_DEALLOC   = 0x40
<a name="l00379"></a>00379 };
<a name="l00380"></a>00380 
<a name="l00381"></a>00381 <span class="comment">/* environment type field */</span>
<a name="l00382"></a>00382 <span class="preprocessor">#define TDS_ENV_DATABASE        1</span>
<a name="l00383"></a>00383 <span class="preprocessor"></span><span class="preprocessor">#define TDS_ENV_LANG            2</span>
<a name="l00384"></a>00384 <span class="preprocessor"></span><span class="preprocessor">#define TDS_ENV_CHARSET         3</span>
<a name="l00385"></a>00385 <span class="preprocessor"></span><span class="preprocessor">#define TDS_ENV_PACKSIZE        4</span>
<a name="l00386"></a>00386 <span class="preprocessor"></span><span class="preprocessor">#define TDS_ENV_LCID            5</span>
<a name="l00387"></a>00387 <span class="preprocessor"></span><span class="preprocessor">#define TDS_ENV_SQLCOLLATION    7</span>
<a name="l00388"></a>00388 <span class="preprocessor"></span><span class="preprocessor">#define TDS_ENV_BEGINTRANS      8</span>
<a name="l00389"></a>00389 <span class="preprocessor"></span><span class="preprocessor">#define TDS_ENV_COMMITTRANS     9</span>
<a name="l00390"></a>00390 <span class="preprocessor"></span><span class="preprocessor">#define TDS_ENV_ROLLBACKTRANS   10</span>
<a name="l00391"></a>00391 <span class="preprocessor"></span>
<a name="l00392"></a>00392 <span class="comment">/* string types */</span>
<a name="l00393"></a>00393 <span class="preprocessor">#define TDS_NULLTERM -9</span>
<a name="l00394"></a>00394 <span class="preprocessor"></span>
<a name="l00395"></a>00395 <span class="comment">/* Microsoft internal stored procedure id&#39;s */</span>
<a name="l00396"></a>00396 
<a name="l00397"></a>00397 <span class="preprocessor">#define TDS_SP_CURSOR           1</span>
<a name="l00398"></a>00398 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SP_CURSOROPEN       2</span>
<a name="l00399"></a>00399 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SP_CURSORPREPARE    3</span>
<a name="l00400"></a>00400 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SP_CURSOREXECUTE    4</span>
<a name="l00401"></a>00401 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SP_CURSORPREPEXEC   5</span>
<a name="l00402"></a>00402 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SP_CURSORUNPREPARE  6</span>
<a name="l00403"></a>00403 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SP_CURSORFETCH      7</span>
<a name="l00404"></a>00404 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SP_CURSOROPTION     8</span>
<a name="l00405"></a>00405 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SP_CURSORCLOSE      9</span>
<a name="l00406"></a>00406 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SP_EXECUTESQL      10</span>
<a name="l00407"></a>00407 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SP_PREPARE         11</span>
<a name="l00408"></a>00408 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SP_EXECUTE         12</span>
<a name="l00409"></a>00409 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SP_PREPEXEC        13</span>
<a name="l00410"></a>00410 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SP_PREPEXECRPC     14</span>
<a name="l00411"></a>00411 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SP_UNPREPARE       15</span>
<a name="l00412"></a>00412 <span class="preprocessor"></span><span class="comment">/* </span>
<a name="l00413"></a>00413 <span class="comment"> * &lt;rant&gt; Sybase does an awful job of this stuff, non null ints of size 1 2 </span>
<a name="l00414"></a>00414 <span class="comment"> * and 4 have there own codes but nullable ints are lumped into INTN</span>
<a name="l00415"></a>00415 <span class="comment"> * sheesh! &lt;/rant&gt;</span>
<a name="l00416"></a>00416 <span class="comment"> */</span>
<a name="l00417"></a>00417 <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00418"></a>00418 {
<a name="l00419"></a>00419         SYBCHAR = 47,           <span class="comment">/* 0x2F */</span>
<a name="l00420"></a>00420 <span class="preprocessor">#define SYBCHAR SYBCHAR</span>
<a name="l00421"></a>00421 <span class="preprocessor"></span>        SYBVARCHAR = 39,        <span class="comment">/* 0x27 */</span>
<a name="l00422"></a>00422 <span class="preprocessor">#define SYBVARCHAR      SYBVARCHAR</span>
<a name="l00423"></a>00423 <span class="preprocessor"></span>        SYBINTN = 38,           <span class="comment">/* 0x26 */</span>
<a name="l00424"></a>00424 <span class="preprocessor">#define SYBINTN SYBINTN</span>
<a name="l00425"></a>00425 <span class="preprocessor"></span>        SYBINT1 = 48,           <span class="comment">/* 0x30 */</span>
<a name="l00426"></a>00426 <span class="preprocessor">#define SYBINT1 SYBINT1</span>
<a name="l00427"></a>00427 <span class="preprocessor"></span>        SYBINT2 = 52,           <span class="comment">/* 0x34 */</span>
<a name="l00428"></a>00428 <span class="preprocessor">#define SYBINT2 SYBINT2</span>
<a name="l00429"></a>00429 <span class="preprocessor"></span>        SYBINT4 = 56,           <span class="comment">/* 0x38 */</span>
<a name="l00430"></a>00430 <span class="preprocessor">#define SYBINT4 SYBINT4</span>
<a name="l00431"></a>00431 <span class="preprocessor"></span>        SYBFLT8 = 62,           <span class="comment">/* 0x3E */</span>
<a name="l00432"></a>00432 <span class="preprocessor">#define SYBFLT8 SYBFLT8</span>
<a name="l00433"></a>00433 <span class="preprocessor"></span>        SYBDATETIME = 61,       <span class="comment">/* 0x3D */</span>
<a name="l00434"></a>00434 <span class="preprocessor">#define SYBDATETIME     SYBDATETIME</span>
<a name="l00435"></a>00435 <span class="preprocessor"></span>        SYBBIT = 50,            <span class="comment">/* 0x32 */</span>
<a name="l00436"></a>00436 <span class="preprocessor">#define SYBBIT  SYBBIT</span>
<a name="l00437"></a>00437 <span class="preprocessor"></span>        SYBTEXT = 35,           <span class="comment">/* 0x23 */</span>
<a name="l00438"></a>00438 <span class="preprocessor">#define SYBTEXT SYBTEXT</span>
<a name="l00439"></a>00439 <span class="preprocessor"></span>        SYBNTEXT = 99,          <span class="comment">/* 0x63 */</span>
<a name="l00440"></a>00440 <span class="preprocessor">#define SYBNTEXT        SYBNTEXT</span>
<a name="l00441"></a>00441 <span class="preprocessor"></span>        SYBIMAGE = 34,          <span class="comment">/* 0x22 */</span>
<a name="l00442"></a>00442 <span class="preprocessor">#define SYBIMAGE        SYBIMAGE</span>
<a name="l00443"></a>00443 <span class="preprocessor"></span>        SYBMONEY4 = 122,        <span class="comment">/* 0x7A */</span>
<a name="l00444"></a>00444 <span class="preprocessor">#define SYBMONEY4       SYBMONEY4</span>
<a name="l00445"></a>00445 <span class="preprocessor"></span>        SYBMONEY = 60,          <span class="comment">/* 0x3C */</span>
<a name="l00446"></a>00446 <span class="preprocessor">#define SYBMONEY        SYBMONEY</span>
<a name="l00447"></a>00447 <span class="preprocessor"></span>        SYBDATETIME4 = 58,      <span class="comment">/* 0x3A */</span>
<a name="l00448"></a>00448 <span class="preprocessor">#define SYBDATETIME4    SYBDATETIME4</span>
<a name="l00449"></a>00449 <span class="preprocessor"></span>        SYBREAL = 59,           <span class="comment">/* 0x3B */</span>
<a name="l00450"></a>00450 <span class="preprocessor">#define SYBREAL SYBREAL</span>
<a name="l00451"></a>00451 <span class="preprocessor"></span>        SYBBINARY = 45,         <span class="comment">/* 0x2D */</span>
<a name="l00452"></a>00452 <span class="preprocessor">#define SYBBINARY       SYBBINARY</span>
<a name="l00453"></a>00453 <span class="preprocessor"></span>        SYBVOID = 31,           <span class="comment">/* 0x1F */</span>
<a name="l00454"></a>00454 <span class="preprocessor">#define SYBVOID SYBVOID</span>
<a name="l00455"></a>00455 <span class="preprocessor"></span>        SYBVARBINARY = 37,      <span class="comment">/* 0x25 */</span>
<a name="l00456"></a>00456 <span class="preprocessor">#define SYBVARBINARY    SYBVARBINARY</span>
<a name="l00457"></a>00457 <span class="preprocessor"></span>        SYBBITN = 104,          <span class="comment">/* 0x68 */</span>
<a name="l00458"></a>00458 <span class="preprocessor">#define SYBBITN SYBBITN</span>
<a name="l00459"></a>00459 <span class="preprocessor"></span>        SYBNUMERIC = 108,       <span class="comment">/* 0x6C */</span>
<a name="l00460"></a>00460 <span class="preprocessor">#define SYBNUMERIC      SYBNUMERIC</span>
<a name="l00461"></a>00461 <span class="preprocessor"></span>        SYBDECIMAL = 106,       <span class="comment">/* 0x6A */</span>
<a name="l00462"></a>00462 <span class="preprocessor">#define SYBDECIMAL      SYBDECIMAL</span>
<a name="l00463"></a>00463 <span class="preprocessor"></span>        SYBFLTN = 109,          <span class="comment">/* 0x6D */</span>
<a name="l00464"></a>00464 <span class="preprocessor">#define SYBFLTN SYBFLTN</span>
<a name="l00465"></a>00465 <span class="preprocessor"></span>        SYBMONEYN = 110,        <span class="comment">/* 0x6E */</span>
<a name="l00466"></a>00466 <span class="preprocessor">#define SYBMONEYN       SYBMONEYN</span>
<a name="l00467"></a>00467 <span class="preprocessor"></span>        SYBDATETIMN = 111,      <span class="comment">/* 0x6F */</span>
<a name="l00468"></a>00468 <span class="preprocessor">#define SYBDATETIMN     SYBDATETIMN</span>
<a name="l00469"></a>00469 <span class="preprocessor"></span>
<a name="l00470"></a>00470 <span class="comment">/*</span>
<a name="l00471"></a>00471 <span class="comment"> * MS only types</span>
<a name="l00472"></a>00472 <span class="comment"> */</span>
<a name="l00473"></a>00473         SYBNVARCHAR = 103,      <span class="comment">/* 0x67 */</span>
<a name="l00474"></a>00474 <span class="preprocessor">#define SYBNVARCHAR     SYBNVARCHAR</span>
<a name="l00475"></a>00475 <span class="preprocessor"></span>        SYBINT8 = 127,          <span class="comment">/* 0x7F */</span>
<a name="l00476"></a>00476 <span class="preprocessor">#define SYBINT8 SYBINT8</span>
<a name="l00477"></a>00477 <span class="preprocessor"></span>        XSYBCHAR = 175,         <span class="comment">/* 0xAF */</span>
<a name="l00478"></a>00478 <span class="preprocessor">#define XSYBCHAR        XSYBCHAR</span>
<a name="l00479"></a>00479 <span class="preprocessor"></span>        XSYBVARCHAR = 167,      <span class="comment">/* 0xA7 */</span>
<a name="l00480"></a>00480 <span class="preprocessor">#define XSYBVARCHAR     XSYBVARCHAR</span>
<a name="l00481"></a>00481 <span class="preprocessor"></span>        XSYBNVARCHAR = 231,     <span class="comment">/* 0xE7 */</span>
<a name="l00482"></a>00482 <span class="preprocessor">#define XSYBNVARCHAR    XSYBNVARCHAR</span>
<a name="l00483"></a>00483 <span class="preprocessor"></span>        XSYBNCHAR = 239,        <span class="comment">/* 0xEF */</span>
<a name="l00484"></a>00484 <span class="preprocessor">#define XSYBNCHAR       XSYBNCHAR</span>
<a name="l00485"></a>00485 <span class="preprocessor"></span>        XSYBVARBINARY = 165,    <span class="comment">/* 0xA5 */</span>
<a name="l00486"></a>00486 <span class="preprocessor">#define XSYBVARBINARY   XSYBVARBINARY</span>
<a name="l00487"></a>00487 <span class="preprocessor"></span>        XSYBBINARY = 173,       <span class="comment">/* 0xAD */</span>
<a name="l00488"></a>00488 <span class="preprocessor">#define XSYBBINARY      XSYBBINARY</span>
<a name="l00489"></a>00489 <span class="preprocessor"></span>        SYBUNIQUE = 36,         <span class="comment">/* 0x24 */</span>
<a name="l00490"></a>00490 <span class="preprocessor">#define SYBUNIQUE       SYBUNIQUE</span>
<a name="l00491"></a>00491 <span class="preprocessor"></span>        SYBVARIANT = 98,        <span class="comment">/* 0x62 */</span>
<a name="l00492"></a>00492 <span class="preprocessor">#define SYBVARIANT      SYBVARIANT</span>
<a name="l00493"></a>00493 <span class="preprocessor"></span>        SYBMSUDT = 240,         <span class="comment">/* 0xF0 */</span>
<a name="l00494"></a>00494 <span class="preprocessor">#define SYBMSUDT SYBMSUDT</span>
<a name="l00495"></a>00495 <span class="preprocessor"></span>        SYBMSXML = 241,         <span class="comment">/* 0xF1 */</span>
<a name="l00496"></a>00496 <span class="preprocessor">#define SYBMSXML SYBMSXML</span>
<a name="l00497"></a>00497 <span class="preprocessor"></span>
<a name="l00498"></a>00498 <span class="comment">/*</span>
<a name="l00499"></a>00499 <span class="comment"> * Sybase only types</span>
<a name="l00500"></a>00500 <span class="comment"> */</span>
<a name="l00501"></a>00501         SYBLONGBINARY = 225,    <span class="comment">/* 0xE1 */</span>
<a name="l00502"></a>00502 <span class="preprocessor">#define SYBLONGBINARY   SYBLONGBINARY</span>
<a name="l00503"></a>00503 <span class="preprocessor"></span>        SYBUINT1 = 64,          <span class="comment">/* 0x40 */</span>
<a name="l00504"></a>00504 <span class="preprocessor">#define SYBUINT1        SYBUINT1</span>
<a name="l00505"></a>00505 <span class="preprocessor"></span>        SYBUINT2 = 65,          <span class="comment">/* 0x41 */</span>
<a name="l00506"></a>00506 <span class="preprocessor">#define SYBUINT2        SYBUINT2</span>
<a name="l00507"></a>00507 <span class="preprocessor"></span>        SYBUINT4 = 66,          <span class="comment">/* 0x42 */</span>
<a name="l00508"></a>00508 <span class="preprocessor">#define SYBUINT4        SYBUINT4</span>
<a name="l00509"></a>00509 <span class="preprocessor"></span>        SYBUINT8 = 67,          <span class="comment">/* 0x43 */</span>
<a name="l00510"></a>00510 <span class="preprocessor">#define SYBUINT8        SYBUINT8</span>
<a name="l00511"></a>00511 <span class="preprocessor"></span>        SYBBLOB = 36,           <span class="comment">/* 0x24 */</span>
<a name="l00512"></a>00512 <span class="preprocessor">#define SYBBLOB         SYBBLOB</span>
<a name="l00513"></a>00513 <span class="preprocessor"></span>        SYBBOUNDARY = 104,      <span class="comment">/* 0x68 */</span>
<a name="l00514"></a>00514 <span class="preprocessor">#define SYBBOUNDARY     SYBBOUNDARY</span>
<a name="l00515"></a>00515 <span class="preprocessor"></span>        SYBDATE = 49,           <span class="comment">/* 0x31 */</span>
<a name="l00516"></a>00516 <span class="preprocessor">#define SYBDATE         SYBDATE</span>
<a name="l00517"></a>00517 <span class="preprocessor"></span>        SYBDATEN = 123,         <span class="comment">/* 0x7B */</span>
<a name="l00518"></a>00518 <span class="preprocessor">#define SYBDATEN        SYBDATEN</span>
<a name="l00519"></a>00519 <span class="preprocessor"></span>        SYB5INT8 = 191,         <span class="comment">/* 0xBF */</span>
<a name="l00520"></a>00520 <span class="preprocessor">#define SYB5INT8                SYB5INT8</span>
<a name="l00521"></a>00521 <span class="preprocessor"></span>        SYBINTERVAL = 46,       <span class="comment">/* 0x2E */</span>
<a name="l00522"></a>00522 <span class="preprocessor">#define SYBINTERVAL     SYBINTERVAL</span>
<a name="l00523"></a>00523 <span class="preprocessor"></span>        SYBLONGCHAR = 175,      <span class="comment">/* 0xAF */</span>
<a name="l00524"></a>00524 <span class="preprocessor">#define SYBLONGCHAR     SYBLONGCHAR</span>
<a name="l00525"></a>00525 <span class="preprocessor"></span>        SYBSENSITIVITY = 103,   <span class="comment">/* 0x67 */</span>
<a name="l00526"></a>00526 <span class="preprocessor">#define SYBSENSITIVITY  SYBSENSITIVITY</span>
<a name="l00527"></a>00527 <span class="preprocessor"></span>        SYBSINT1 = 176,         <span class="comment">/* 0xB0 */</span>
<a name="l00528"></a>00528 <span class="preprocessor">#define SYBSINT1        SYBSINT1</span>
<a name="l00529"></a>00529 <span class="preprocessor"></span>        SYBTIME = 51,           <span class="comment">/* 0x33 */</span>
<a name="l00530"></a>00530 <span class="preprocessor">#define SYBTIME         SYBTIME</span>
<a name="l00531"></a>00531 <span class="preprocessor"></span>        SYBTIMEN = 147,         <span class="comment">/* 0x93 */</span>
<a name="l00532"></a>00532 <span class="preprocessor">#define SYBTIMEN        SYBTIMEN</span>
<a name="l00533"></a>00533 <span class="preprocessor"></span>        SYBUINTN = 68,          <span class="comment">/* 0x44 */</span>
<a name="l00534"></a>00534 <span class="preprocessor">#define SYBUINTN        SYBUINTN</span>
<a name="l00535"></a>00535 <span class="preprocessor"></span>        SYBUNITEXT = 174,       <span class="comment">/* 0xAE */</span>
<a name="l00536"></a>00536 <span class="preprocessor">#define SYBUNITEXT      SYBUNITEXT</span>
<a name="l00537"></a>00537 <span class="preprocessor"></span>        SYBXML = 163,           <span class="comment">/* 0xA3 */</span>
<a name="l00538"></a>00538 <span class="preprocessor">#define SYBXML          SYBXML</span>
<a name="l00539"></a>00539 <span class="preprocessor"></span>
<a name="l00540"></a>00540 } TDS_SERVER_TYPE;
<a name="l00541"></a>00541 
<a name="l00542"></a>00542 
<a name="l00543"></a>00543 <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00544"></a>00544 {
<a name="l00545"></a>00545         USER_UNICHAR_TYPE = 34,         <span class="comment">/* 0x22 */</span>
<a name="l00546"></a>00546         USER_UNIVARCHAR_TYPE = 35       <span class="comment">/* 0x23 */</span>
<a name="l00547"></a>00547 } TDS_USER_TYPE;
<a name="l00548"></a>00548 
<a name="l00549"></a>00549 <span class="preprocessor">#define SYBAOPCNT  0x4b</span>
<a name="l00550"></a>00550 <span class="preprocessor"></span><span class="preprocessor">#define SYBAOPCNTU 0x4c</span>
<a name="l00551"></a>00551 <span class="preprocessor"></span><span class="preprocessor">#define SYBAOPSUM  0x4d</span>
<a name="l00552"></a>00552 <span class="preprocessor"></span><span class="preprocessor">#define SYBAOPSUMU 0x4e</span>
<a name="l00553"></a>00553 <span class="preprocessor"></span><span class="preprocessor">#define SYBAOPAVG  0x4f</span>
<a name="l00554"></a>00554 <span class="preprocessor"></span><span class="preprocessor">#define SYBAOPAVGU 0x50</span>
<a name="l00555"></a>00555 <span class="preprocessor"></span><span class="preprocessor">#define SYBAOPMIN  0x51</span>
<a name="l00556"></a>00556 <span class="preprocessor"></span><span class="preprocessor">#define SYBAOPMAX  0x52</span>
<a name="l00557"></a>00557 <span class="preprocessor"></span>
<a name="l00558"></a>00558 <span class="comment">/* mssql2k compute operator */</span>
<a name="l00559"></a>00559 <span class="preprocessor">#define SYBAOPCNT_BIG           0x09</span>
<a name="l00560"></a>00560 <span class="preprocessor"></span><span class="preprocessor">#define SYBAOPSTDEV             0x30</span>
<a name="l00561"></a>00561 <span class="preprocessor"></span><span class="preprocessor">#define SYBAOPSTDEVP            0x31</span>
<a name="l00562"></a>00562 <span class="preprocessor"></span><span class="preprocessor">#define SYBAOPVAR               0x32</span>
<a name="l00563"></a>00563 <span class="preprocessor"></span><span class="preprocessor">#define SYBAOPVARP              0x33</span>
<a name="l00564"></a>00564 <span class="preprocessor"></span><span class="preprocessor">#define SYBAOPCHECKSUM_AGG      0x72</span>
<a name="l00565"></a>00565 <span class="preprocessor"></span>
<a name="l00566"></a>00566 
<a name="l00570"></a><a class="code" href="a00159.html#a113928faf73e15b0e0a70b1026e90320">00570</a> <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00571"></a>00571 {
<a name="l00572"></a>00572           TDS_OPT_SET = 1       <span class="comment">/* Set an option. */</span>
<a name="l00573"></a>00573         , TDS_OPT_DEFAULT = 2   <span class="comment">/* Set option to its default value. */</span>
<a name="l00574"></a>00574         , TDS_OPT_LIST = 3      <span class="comment">/* Request current setting of a specific option. */</span>
<a name="l00575"></a>00575         , TDS_OPT_INFO = 4      <span class="comment">/* Report current setting of a specific option. */</span>
<a name="l00576"></a>00576 } <a class="code" href="a00159.html#a113928faf73e15b0e0a70b1026e90320" title="options that can be sent with a TDS_OPTIONCMD token">TDS_OPTION_CMD</a>;
<a name="l00577"></a>00577 
<a name="l00578"></a>00578 <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00579"></a>00579 {
<a name="l00580"></a>00580           TDS_OPT_DATEFIRST = 1         <span class="comment">/* 0x01 */</span>
<a name="l00581"></a>00581         , TDS_OPT_TEXTSIZE = 2          <span class="comment">/* 0x02 */</span>
<a name="l00582"></a>00582         , TDS_OPT_STAT_TIME = 3         <span class="comment">/* 0x03 */</span>
<a name="l00583"></a>00583         , TDS_OPT_STAT_IO = 4           <span class="comment">/* 0x04 */</span>
<a name="l00584"></a>00584         , TDS_OPT_ROWCOUNT = 5          <span class="comment">/* 0x05 */</span>
<a name="l00585"></a>00585         , TDS_OPT_NATLANG = 6           <span class="comment">/* 0x06 */</span>
<a name="l00586"></a>00586         , TDS_OPT_DATEFORMAT = 7        <span class="comment">/* 0x07 */</span>
<a name="l00587"></a>00587         , TDS_OPT_ISOLATION = 8         <span class="comment">/* 0x08 */</span>
<a name="l00588"></a>00588         , TDS_OPT_AUTHON = 9            <span class="comment">/* 0x09 */</span>
<a name="l00589"></a>00589         , TDS_OPT_CHARSET = 10          <span class="comment">/* 0x0a */</span>
<a name="l00590"></a>00590         , TDS_OPT_SHOWPLAN = 13         <span class="comment">/* 0x0d */</span>
<a name="l00591"></a>00591         , TDS_OPT_NOEXEC = 14           <span class="comment">/* 0x0e */</span>
<a name="l00592"></a>00592         , TDS_OPT_ARITHIGNOREON = 15    <span class="comment">/* 0x0f */</span>
<a name="l00593"></a>00593         , TDS_OPT_ARITHABORTON = 17     <span class="comment">/* 0x11 */</span>
<a name="l00594"></a>00594         , TDS_OPT_PARSEONLY = 18        <span class="comment">/* 0x12 */</span>
<a name="l00595"></a>00595         , TDS_OPT_GETDATA = 20          <span class="comment">/* 0x14 */</span>
<a name="l00596"></a>00596         , TDS_OPT_NOCOUNT = 21          <span class="comment">/* 0x15 */</span>
<a name="l00597"></a>00597         , TDS_OPT_FORCEPLAN = 23        <span class="comment">/* 0x17 */</span>
<a name="l00598"></a>00598         , TDS_OPT_FORMATONLY = 24       <span class="comment">/* 0x18 */</span>
<a name="l00599"></a>00599         , TDS_OPT_CHAINXACTS = 25       <span class="comment">/* 0x19 */</span>
<a name="l00600"></a>00600         , TDS_OPT_CURCLOSEONXACT = 26   <span class="comment">/* 0x1a */</span>
<a name="l00601"></a>00601         , TDS_OPT_FIPSFLAG = 27         <span class="comment">/* 0x1b */</span>
<a name="l00602"></a>00602         , TDS_OPT_RESTREES = 28         <span class="comment">/* 0x1c */</span>
<a name="l00603"></a>00603         , TDS_OPT_IDENTITYON = 29       <span class="comment">/* 0x1d */</span>
<a name="l00604"></a>00604         , TDS_OPT_CURREAD = 30          <span class="comment">/* 0x1e */</span>
<a name="l00605"></a>00605         , TDS_OPT_CURWRITE = 31         <span class="comment">/* 0x1f */</span>
<a name="l00606"></a>00606         , TDS_OPT_IDENTITYOFF = 32      <span class="comment">/* 0x20 */</span>
<a name="l00607"></a>00607         , TDS_OPT_AUTHOFF = 33          <span class="comment">/* 0x21 */</span>
<a name="l00608"></a>00608         , TDS_OPT_ANSINULL = 34         <span class="comment">/* 0x22 */</span>
<a name="l00609"></a>00609         , TDS_OPT_QUOTED_IDENT = 35     <span class="comment">/* 0x23 */</span>
<a name="l00610"></a>00610         , TDS_OPT_ARITHIGNOREOFF = 36   <span class="comment">/* 0x24 */</span>
<a name="l00611"></a>00611         , TDS_OPT_ARITHABORTOFF = 37    <span class="comment">/* 0x25 */</span>
<a name="l00612"></a>00612         , TDS_OPT_TRUNCABORT = 38       <span class="comment">/* 0x26 */</span>
<a name="l00613"></a>00613 } TDS_OPTION;
<a name="l00614"></a>00614 
<a name="l00615"></a><a class="code" href="a00112.html">00615</a> <span class="keyword">typedef</span> <span class="keyword">union </span><a class="code" href="a00112.html">tds_option_arg</a>
<a name="l00616"></a>00616 {
<a name="l00617"></a>00617         TDS_TINYINT ti;
<a name="l00618"></a>00618         TDS_INT i;
<a name="l00619"></a>00619         TDS_CHAR *c;
<a name="l00620"></a>00620 } <a class="code" href="a00112.html">TDS_OPTION_ARG</a>;
<a name="l00621"></a>00621 
<a name="l00622"></a>00622 <span class="keyword">enum</span> {
<a name="l00623"></a>00623         TDS_OPT_ARITHOVERFLOW = 0x01,
<a name="l00624"></a>00624         TDS_OPT_NUMERICTRUNC = 0x02
<a name="l00625"></a>00625 };
<a name="l00626"></a>00626 
<a name="l00627"></a>00627 <span class="keyword">enum</span> TDS_OPT_DATEFIRST_CHOICE
<a name="l00628"></a>00628 {
<a name="l00629"></a>00629         TDS_OPT_MONDAY = 1, TDS_OPT_TUESDAY = 2, TDS_OPT_WEDNESDAY = 3, TDS_OPT_THURSDAY = 4, TDS_OPT_FRIDAY = 5, TDS_OPT_SATURDAY =
<a name="l00630"></a>00630                 6, TDS_OPT_SUNDAY = 7
<a name="l00631"></a>00631 };
<a name="l00632"></a>00632 
<a name="l00633"></a>00633 <span class="keyword">enum</span> TDS_OPT_DATEFORMAT_CHOICE
<a name="l00634"></a>00634 {
<a name="l00635"></a>00635         TDS_OPT_FMTMDY = 1, TDS_OPT_FMTDMY = 2, TDS_OPT_FMTYMD = 3, TDS_OPT_FMTYDM = 4, TDS_OPT_FMTMYD = 5, TDS_OPT_FMTDYM = 6
<a name="l00636"></a>00636 };
<a name="l00637"></a>00637 <span class="keyword">enum</span> TDS_OPT_ISOLATION_CHOICE
<a name="l00638"></a>00638 {
<a name="l00639"></a>00639         TDS_OPT_LEVEL1 = 1, TDS_OPT_LEVEL3 = 3
<a name="l00640"></a>00640 };
<a name="l00641"></a>00641 
<a name="l00642"></a>00642 <span class="keyword">typedef</span> <span class="keyword">enum</span> tds_packet_type
<a name="l00643"></a>00643 {
<a name="l00644"></a>00644         TDS_QUERY = 1,
<a name="l00645"></a>00645         TDS_LOGIN = 2,
<a name="l00646"></a>00646         TDS_RPC = 3,
<a name="l00647"></a>00647         TDS_REPLY = 4,
<a name="l00648"></a>00648         TDS_CANCEL = 6,
<a name="l00649"></a>00649         TDS_BULK = 7,
<a name="l00650"></a>00650         TDS_NORMAL = 15,
<a name="l00651"></a>00651         TDS7_LOGIN = 16,
<a name="l00652"></a>00652         TDS7_AUTH = 17,
<a name="l00653"></a>00653         TDS8_PRELOGIN = 18
<a name="l00654"></a>00654 } TDS_PACKET_TYPE;
<a name="l00655"></a>00655 
<a name="l00656"></a>00656 <span class="keyword">typedef</span> <span class="keyword">enum</span> tds_encryption_level {
<a name="l00657"></a>00657         TDS_ENCRYPTION_OFF, TDS_ENCRYPTION_REQUEST, TDS_ENCRYPTION_REQUIRE
<a name="l00658"></a>00658 } TDS_ENCRYPTION_LEVEL;
<a name="l00659"></a>00659 
<a name="l00660"></a>00660 <span class="preprocessor">#define TDS_ZERO_FREE(x) do {free((x)); (x) = NULL;} while(0)</span>
<a name="l00661"></a>00661 <span class="preprocessor"></span><span class="preprocessor">#define TDS_VECTOR_SIZE(x) (sizeof(x)/sizeof(x[0]))</span>
<a name="l00662"></a>00662 <span class="preprocessor"></span>
<a name="l00663"></a>00663 <span class="preprocessor">#if defined(__GNUC__) &amp;&amp; __GNUC__ &gt;= 3</span>
<a name="l00664"></a>00664 <span class="preprocessor"></span><span class="preprocessor"># define TDS_LIKELY(x)  __builtin_expect(!!(x), 1)</span>
<a name="l00665"></a>00665 <span class="preprocessor"></span><span class="preprocessor"># define TDS_UNLIKELY(x)        __builtin_expect(!!(x), 0)</span>
<a name="l00666"></a>00666 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00667"></a>00667 <span class="preprocessor"></span><span class="preprocessor"># define TDS_LIKELY(x)  (x)</span>
<a name="l00668"></a>00668 <span class="preprocessor"></span><span class="preprocessor"># define TDS_UNLIKELY(x)        (x)</span>
<a name="l00669"></a>00669 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00670"></a>00670 <span class="preprocessor"></span>
<a name="l00671"></a>00671 <span class="comment">/*</span>
<a name="l00672"></a>00672 <span class="comment"> * TODO use system macros for optimization</span>
<a name="l00673"></a>00673 <span class="comment"> * See mcrypt for reference and linux kernel source for optimization</span>
<a name="l00674"></a>00674 <span class="comment"> * check if unaligned access and use fast write/read when implemented</span>
<a name="l00675"></a>00675 <span class="comment"> */</span>
<a name="l00676"></a>00676 <span class="preprocessor">#define TDS_BYTE_SWAP16(value)                 \</span>
<a name="l00677"></a>00677 <span class="preprocessor">         (((((unsigned short)value)&lt;&lt;8) &amp; 0xFF00)   | \</span>
<a name="l00678"></a>00678 <span class="preprocessor">          ((((unsigned short)value)&gt;&gt;8) &amp; 0x00FF))</span>
<a name="l00679"></a>00679 <span class="preprocessor"></span>
<a name="l00680"></a>00680 <span class="preprocessor">#define TDS_BYTE_SWAP32(value)                     \</span>
<a name="l00681"></a>00681 <span class="preprocessor">         (((((unsigned long)value)&lt;&lt;24) &amp; 0xFF000000)  | \</span>
<a name="l00682"></a>00682 <span class="preprocessor">          ((((unsigned long)value)&lt;&lt; 8) &amp; 0x00FF0000)  | \</span>
<a name="l00683"></a>00683 <span class="preprocessor">          ((((unsigned long)value)&gt;&gt; 8) &amp; 0x0000FF00)  | \</span>
<a name="l00684"></a>00684 <span class="preprocessor">          ((((unsigned long)value)&gt;&gt;24) &amp; 0x000000FF))</span>
<a name="l00685"></a>00685 <span class="preprocessor"></span>
<a name="l00686"></a>00686 <span class="preprocessor">#define is_end_token(x) (x==TDS_DONE_TOKEN    || \</span>
<a name="l00687"></a>00687 <span class="preprocessor">                        x==TDS_DONEPROC_TOKEN    || \</span>
<a name="l00688"></a>00688 <span class="preprocessor">                        x==TDS_DONEINPROC_TOKEN)</span>
<a name="l00689"></a>00689 <span class="preprocessor"></span>
<a name="l00690"></a>00690 <span class="preprocessor">#define is_hard_end_token(x) (x==TDS_DONE_TOKEN    || \</span>
<a name="l00691"></a>00691 <span class="preprocessor">                        x==TDS_DONEPROC_TOKEN)</span>
<a name="l00692"></a>00692 <span class="preprocessor"></span>
<a name="l00693"></a>00693 <span class="preprocessor">#define is_msg_token(x) (x==TDS_INFO_TOKEN    || \</span>
<a name="l00694"></a>00694 <span class="preprocessor">                        x==TDS_ERROR_TOKEN    || \</span>
<a name="l00695"></a>00695 <span class="preprocessor">                        x==TDS_EED_TOKEN)</span>
<a name="l00696"></a>00696 <span class="preprocessor"></span>
<a name="l00697"></a>00697 <span class="preprocessor">#define is_result_token(x) (x==TDS_RESULT_TOKEN || \</span>
<a name="l00698"></a>00698 <span class="preprocessor">                        x==TDS_ROWFMT2_TOKEN    || \</span>
<a name="l00699"></a>00699 <span class="preprocessor">                        x==TDS7_RESULT_TOKEN    || \</span>
<a name="l00700"></a>00700 <span class="preprocessor">                        x==TDS_COLFMT_TOKEN     || \</span>
<a name="l00701"></a>00701 <span class="preprocessor">                        x==TDS_COLNAME_TOKEN    || \</span>
<a name="l00702"></a>00702 <span class="preprocessor">                        x==TDS_RETURNSTATUS_TOKEN)</span>
<a name="l00703"></a>00703 <span class="preprocessor"></span>
<a name="l00704"></a>00704 <span class="comment">/* FIXME -- not a complete list */</span>
<a name="l00705"></a>00705 <span class="preprocessor">#define is_fixed_type(x) (x==SYBINT1    || \</span>
<a name="l00706"></a>00706 <span class="preprocessor">                        x==SYBINT2      || \</span>
<a name="l00707"></a>00707 <span class="preprocessor">                        x==SYBINT4      || \</span>
<a name="l00708"></a>00708 <span class="preprocessor">                        x==SYBINT8      || \</span>
<a name="l00709"></a>00709 <span class="preprocessor">                        x==SYBREAL      || \</span>
<a name="l00710"></a>00710 <span class="preprocessor">                        x==SYBFLT8      || \</span>
<a name="l00711"></a>00711 <span class="preprocessor">                        x==SYBDATETIME  || \</span>
<a name="l00712"></a>00712 <span class="preprocessor">                        x==SYBDATETIME4 || \</span>
<a name="l00713"></a>00713 <span class="preprocessor">                        x==SYBBIT       || \</span>
<a name="l00714"></a>00714 <span class="preprocessor">                        x==SYBMONEY     || \</span>
<a name="l00715"></a>00715 <span class="preprocessor">                        x==SYBMONEY4    || \</span>
<a name="l00716"></a>00716 <span class="preprocessor">                        x==SYBVOID      || \</span>
<a name="l00717"></a>00717 <span class="preprocessor">                        x==SYBUNIQUE)</span>
<a name="l00718"></a>00718 <span class="preprocessor"></span><span class="preprocessor">#define is_nullable_type(x) ( \</span>
<a name="l00719"></a>00719 <span class="preprocessor">                        x==SYBBITN      || \</span>
<a name="l00720"></a>00720 <span class="preprocessor">                     x==SYBINTN      || \</span>
<a name="l00721"></a>00721 <span class="preprocessor">                     x==SYBFLTN      || \</span>
<a name="l00722"></a>00722 <span class="preprocessor">                     x==SYBMONEYN    || \</span>
<a name="l00723"></a>00723 <span class="preprocessor">                     x==SYBDATETIMN  || \</span>
<a name="l00724"></a>00724 <span class="preprocessor">                     x==SYBVARCHAR   || \</span>
<a name="l00725"></a>00725 <span class="preprocessor">                     x==SYBBINARY    || \</span>
<a name="l00726"></a>00726 <span class="preprocessor">                     x==SYBVARBINARY || \</span>
<a name="l00727"></a>00727 <span class="preprocessor">                     x==SYBTEXT      || \</span>
<a name="l00728"></a>00728 <span class="preprocessor">                     x==SYBNTEXT     || \</span>
<a name="l00729"></a>00729 <span class="preprocessor">                     x==SYBIMAGE)</span>
<a name="l00730"></a>00730 <span class="preprocessor"></span>
<a name="l00731"></a>00731 <span class="preprocessor">#define is_variable_type(x) ( \</span>
<a name="l00732"></a>00732 <span class="preprocessor">        (x)==SYBTEXT    || \</span>
<a name="l00733"></a>00733 <span class="preprocessor">        (x)==SYBIMAGE   || \</span>
<a name="l00734"></a>00734 <span class="preprocessor">        (x)==SYBNTEXT   || \</span>
<a name="l00735"></a>00735 <span class="preprocessor">        (x)==SYBCHAR    || \</span>
<a name="l00736"></a>00736 <span class="preprocessor">        (x)==SYBVARCHAR || \</span>
<a name="l00737"></a>00737 <span class="preprocessor">        (x)==SYBBINARY  || \</span>
<a name="l00738"></a>00738 <span class="preprocessor">        (x)==SYBVARBINARY       || \</span>
<a name="l00739"></a>00739 <span class="preprocessor">        (x)==SYBLONGBINARY      || \</span>
<a name="l00740"></a>00740 <span class="preprocessor">        (x)==XSYBCHAR   || \</span>
<a name="l00741"></a>00741 <span class="preprocessor">        (x)==XSYBVARCHAR        || \</span>
<a name="l00742"></a>00742 <span class="preprocessor">        (x)==XSYBNVARCHAR       || \</span>
<a name="l00743"></a>00743 <span class="preprocessor">        (x)==XSYBNCHAR)</span>
<a name="l00744"></a>00744 <span class="preprocessor"></span>
<a name="l00745"></a>00745 <span class="preprocessor">#define is_blob_type(x) (x==SYBTEXT || x==SYBIMAGE || x==SYBNTEXT)</span>
<a name="l00746"></a>00746 <span class="preprocessor"></span><span class="preprocessor">#define is_blob_col(x) ((x)-&gt;column_varint_size &gt; 2)</span>
<a name="l00747"></a>00747 <span class="preprocessor"></span><span class="comment">/* large type means it has a two byte size field */</span>
<a name="l00748"></a>00748 <span class="comment">/* define is_large_type(x) (x&gt;128) */</span>
<a name="l00749"></a>00749 <span class="preprocessor">#define is_numeric_type(x) (x==SYBNUMERIC || x==SYBDECIMAL)</span>
<a name="l00750"></a>00750 <span class="preprocessor"></span><span class="preprocessor">#define is_unicode_type(x) (x==XSYBNVARCHAR || x==XSYBNCHAR || x==SYBNTEXT || x==SYBMSXML)</span>
<a name="l00751"></a>00751 <span class="preprocessor"></span><span class="preprocessor">#define is_collate_type(x) (x==XSYBVARCHAR || x==XSYBCHAR || x==SYBTEXT || x==XSYBNVARCHAR || x==XSYBNCHAR || x==SYBNTEXT)</span>
<a name="l00752"></a>00752 <span class="preprocessor"></span><span class="preprocessor">#define is_ascii_type(x) ( x==XSYBCHAR || x==XSYBVARCHAR || x==SYBTEXT || x==SYBCHAR || x==SYBVARCHAR)</span>
<a name="l00753"></a>00753 <span class="preprocessor"></span><span class="preprocessor">#define is_char_type(x) (is_unicode_type(x) || is_ascii_type(x))</span>
<a name="l00754"></a>00754 <span class="preprocessor"></span><span class="preprocessor">#define is_similar_type(x, y) ((is_char_type(x) &amp;&amp; is_char_type(y)) || ((is_unicode_type(x) &amp;&amp; is_unicode_type(y))))</span>
<a name="l00755"></a>00755 <span class="preprocessor"></span>
<a name="l00756"></a>00756 
<a name="l00757"></a>00757 <span class="preprocessor">#define TDS_MAX_CAPABILITY      22</span>
<a name="l00758"></a>00758 <span class="preprocessor"></span><span class="preprocessor">#define MAXPRECISION            77</span>
<a name="l00759"></a>00759 <span class="preprocessor"></span><span class="preprocessor">#define TDS_MAX_CONN            4096</span>
<a name="l00760"></a>00760 <span class="preprocessor"></span><span class="preprocessor">#define TDS_MAX_DYNID_LEN       30</span>
<a name="l00761"></a>00761 <span class="preprocessor"></span>
<a name="l00762"></a>00762 <span class="comment">/* defaults to use if no others are found */</span>
<a name="l00763"></a>00763 <span class="preprocessor">#define TDS_DEF_SERVER          &quot;SYBASE&quot;</span>
<a name="l00764"></a>00764 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DEF_BLKSZ           512</span>
<a name="l00765"></a>00765 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DEF_CHARSET         &quot;iso_1&quot;</span>
<a name="l00766"></a>00766 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DEF_LANG            &quot;us_english&quot;</span>
<a name="l00767"></a>00767 <span class="preprocessor"></span><span class="preprocessor">#if TDS42</span>
<a name="l00768"></a>00768 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DEFAULT_VERSION     0x402</span>
<a name="l00769"></a>00769 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DEF_PORT            1433</span>
<a name="l00770"></a>00770 <span class="preprocessor"></span><span class="preprocessor">#elif TDS46</span>
<a name="l00771"></a>00771 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DEFAULT_VERSION     0x406</span>
<a name="l00772"></a>00772 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DEF_PORT            4000</span>
<a name="l00773"></a>00773 <span class="preprocessor"></span><span class="preprocessor">#elif TDS70</span>
<a name="l00774"></a>00774 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DEFAULT_VERSION     0x700</span>
<a name="l00775"></a>00775 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DEF_PORT            1433</span>
<a name="l00776"></a>00776 <span class="preprocessor"></span><span class="preprocessor">#elif TDS71</span>
<a name="l00777"></a>00777 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DEFAULT_VERSION     0x701</span>
<a name="l00778"></a>00778 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DEF_PORT            1433</span>
<a name="l00779"></a>00779 <span class="preprocessor"></span><span class="preprocessor">#elif TDS72</span>
<a name="l00780"></a>00780 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DEFAULT_VERSION     0x702</span>
<a name="l00781"></a>00781 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DEF_PORT            1433</span>
<a name="l00782"></a>00782 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00783"></a>00783 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DEFAULT_VERSION     0x500</span>
<a name="l00784"></a>00784 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DEF_PORT            4000</span>
<a name="l00785"></a>00785 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00786"></a>00786 <span class="preprocessor"></span>
<a name="l00787"></a>00787 <span class="comment">/* normalized strings from freetds.conf file */</span>
<a name="l00788"></a>00788 <span class="preprocessor">#define TDS_STR_VERSION  &quot;tds version&quot;</span>
<a name="l00789"></a>00789 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_BLKSZ    &quot;initial block size&quot;</span>
<a name="l00790"></a>00790 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_SWAPDT   &quot;swap broken dates&quot;</span>
<a name="l00791"></a>00791 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_DUMPFILE &quot;dump file&quot;</span>
<a name="l00792"></a>00792 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_DEBUGLVL &quot;debug level&quot;</span>
<a name="l00793"></a>00793 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_DEBUGFLAGS &quot;debug flags&quot;</span>
<a name="l00794"></a>00794 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_TIMEOUT  &quot;timeout&quot;</span>
<a name="l00795"></a>00795 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_QUERY_TIMEOUT  &quot;query timeout&quot;</span>
<a name="l00796"></a>00796 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_CONNTIMEOUT &quot;connect timeout&quot;</span>
<a name="l00797"></a>00797 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_HOSTNAME &quot;hostname&quot;</span>
<a name="l00798"></a>00798 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_HOST     &quot;host&quot;</span>
<a name="l00799"></a>00799 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_PORT     &quot;port&quot;</span>
<a name="l00800"></a>00800 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_TEXTSZ   &quot;text size&quot;</span>
<a name="l00801"></a>00801 <span class="preprocessor"></span><span class="comment">/* for big endian hosts */</span>
<a name="l00802"></a>00802 <span class="preprocessor">#define TDS_STR_EMUL_LE &quot;emulate little endian&quot;</span>
<a name="l00803"></a>00803 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_CHARSET &quot;charset&quot;</span>
<a name="l00804"></a>00804 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_CLCHARSET       &quot;client charset&quot;</span>
<a name="l00805"></a>00805 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_LANGUAGE        &quot;language&quot;</span>
<a name="l00806"></a>00806 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_APPENDMODE      &quot;dump file append&quot;</span>
<a name="l00807"></a>00807 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_DATEFMT &quot;date format&quot;</span>
<a name="l00808"></a>00808 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_INSTANCE &quot;instance&quot;</span>
<a name="l00809"></a>00809 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_ASA_DATABASE    &quot;asa database&quot;</span>
<a name="l00810"></a>00810 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_ENCRYPTION       &quot;encryption&quot;</span>
<a name="l00811"></a>00811 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_USENTLMV2       &quot;use ntlmv2&quot;</span>
<a name="l00812"></a>00812 <span class="preprocessor"></span><span class="comment">/* conf values */</span>
<a name="l00813"></a>00813 <span class="preprocessor">#define TDS_STR_ENCRYPTION_OFF   &quot;off&quot;</span>
<a name="l00814"></a>00814 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_ENCRYPTION_REQUEST &quot;request&quot;</span>
<a name="l00815"></a>00815 <span class="preprocessor"></span><span class="preprocessor">#define TDS_STR_ENCRYPTION_REQUIRE &quot;require&quot;</span>
<a name="l00816"></a>00816 <span class="preprocessor"></span><span class="comment">/* Defines to enable optional GSSAPI delegation */</span>
<a name="l00817"></a>00817 <span class="preprocessor">#define TDS_GSSAPI_DELEGATION &quot;enable gssapi delegation&quot;</span>
<a name="l00818"></a>00818 <span class="preprocessor"></span><span class="comment">/* Kerberos realm name */</span>
<a name="l00819"></a>00819 <span class="preprocessor">#define TDS_STR_REALM   &quot;realm&quot;</span>
<a name="l00820"></a>00820 <span class="preprocessor"></span>
<a name="l00821"></a>00821 
<a name="l00822"></a>00822 <span class="comment">/* TODO do a better check for alignment than this */</span>
<a name="l00823"></a><a class="code" href="a00086.html">00823</a> <span class="keyword">typedef</span> <span class="keyword">union</span>
<a name="l00824"></a>00824 {
<a name="l00825"></a>00825         <span class="keywordtype">void</span> *p;
<a name="l00826"></a>00826         <span class="keywordtype">int</span> i;
<a name="l00827"></a>00827 } <a class="code" href="a00086.html">tds_align_struct</a>;
<a name="l00828"></a>00828 
<a name="l00829"></a>00829 <span class="preprocessor">#define TDS_ALIGN_SIZE sizeof(tds_align_struct)</span>
<a name="l00830"></a>00830 <span class="preprocessor"></span>
<a name="l00831"></a>00831 <span class="preprocessor">#define TDS_MAX_LOGIN_STR_SZ 30</span>
<a name="l00832"></a><a class="code" href="a00107.html">00832</a> <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00107.html">tds_login</a>
<a name="l00833"></a>00833 {
<a name="l00834"></a>00834         <a class="code" href="a00100.html">DSTR</a> server_name;
<a name="l00835"></a>00835         <span class="keywordtype">int</span> port;
<a name="l00836"></a>00836         TDS_USMALLINT tds_version;      <span class="comment">/* TDS version */</span>
<a name="l00837"></a>00837         <span class="keywordtype">int</span> block_size;
<a name="l00838"></a>00838         <a class="code" href="a00100.html">DSTR</a> language;                  <span class="comment">/* e.g. us-english */</span>
<a name="l00839"></a>00839         <a class="code" href="a00100.html">DSTR</a> server_charset;            <span class="comment">/* e.g. iso_1 */</span>
<a name="l00840"></a>00840         TDS_INT connect_timeout;
<a name="l00841"></a>00841         <a class="code" href="a00100.html">DSTR</a> client_host_name;
<a name="l00842"></a>00842         <a class="code" href="a00100.html">DSTR</a> app_name;
<a name="l00843"></a>00843         <a class="code" href="a00100.html">DSTR</a> user_name;
<a name="l00844"></a>00844         <a class="code" href="a00100.html">DSTR</a> password;
<a name="l00845"></a>00845         
<a name="l00846"></a>00846         <a class="code" href="a00100.html">DSTR</a> library;   <span class="comment">/* Ct-Library, DB-Library,  TDS-Library or ODBC */</span>
<a name="l00847"></a>00847         TDS_TINYINT encryption_level;
<a name="l00848"></a>00848 
<a name="l00849"></a>00849         TDS_INT query_timeout;
<a name="l00850"></a>00850         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> capabilities[TDS_MAX_CAPABILITY];
<a name="l00851"></a>00851         <a class="code" href="a00100.html">DSTR</a> client_charset;
<a name="l00852"></a>00852         <a class="code" href="a00100.html">DSTR</a> database;
<a name="l00853"></a>00853         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bulk_copy:1;
<a name="l00854"></a>00854         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> suppress_language:1;
<a name="l00855"></a>00855 } <a class="code" href="a00107.html">TDSLOGIN</a>;
<a name="l00856"></a>00856 
<a name="l00857"></a><a class="code" href="a00094.html">00857</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00094.html">tds_connection</a>
<a name="l00858"></a>00858 {
<a name="l00859"></a>00859         <span class="comment">/* first part of structure is the same of login one */</span>
<a name="l00860"></a><a class="code" href="a00094.html#aee4260a5488b31b7b35f0f240f447c27">00860</a>         <a class="code" href="a00100.html">DSTR</a> <a class="code" href="a00094.html#aee4260a5488b31b7b35f0f240f447c27" title="server name (in freetds.conf)">server_name</a>; 
<a name="l00861"></a><a class="code" href="a00094.html#ac67a95493cfb93c4d2f079802397e6f1">00861</a>         <span class="keywordtype">int</span> <a class="code" href="a00094.html#ac67a95493cfb93c4d2f079802397e6f1" title="port of database service">port</a>;          
<a name="l00862"></a>00862         TDS_USMALLINT tds_version;
<a name="l00863"></a>00863         <span class="keywordtype">int</span> block_size;
<a name="l00864"></a>00864         <a class="code" href="a00100.html">DSTR</a> language;
<a name="l00865"></a><a class="code" href="a00094.html#a02ee7abb016629cd09079514ec66765f">00865</a>         <a class="code" href="a00100.html">DSTR</a> <a class="code" href="a00094.html#a02ee7abb016629cd09079514ec66765f" title="charset of server">server_charset</a>;    
<a name="l00866"></a>00866         TDS_INT connect_timeout;
<a name="l00867"></a>00867         <a class="code" href="a00100.html">DSTR</a> client_host_name;
<a name="l00868"></a>00868         <a class="code" href="a00100.html">DSTR</a> server_host_name;
<a name="l00869"></a><a class="code" href="a00094.html#a50078b860467d553f15249dd7c48f93e">00869</a>         <a class="code" href="a00100.html">DSTR</a> <a class="code" href="a00094.html#a50078b860467d553f15249dd7c48f93e" title="server realm name (in freetds.conf)">server_realm_name</a>;         
<a name="l00870"></a>00870         <a class="code" href="a00100.html">DSTR</a> app_name;
<a name="l00871"></a><a class="code" href="a00094.html#aed5b79ef1611590fbaafde80d85425cf">00871</a>         <a class="code" href="a00100.html">DSTR</a> <a class="code" href="a00094.html#aed5b79ef1611590fbaafde80d85425cf" title="account for login">user_name</a>;         
<a name="l00872"></a><a class="code" href="a00094.html#a379f1539fc9d9009e358efa671f0c494">00872</a>         <a class="code" href="a00100.html">DSTR</a> <a class="code" href="a00094.html#a379f1539fc9d9009e358efa671f0c494" title="password of account login">password</a>;          
<a name="l00873"></a>00873         <a class="code" href="a00100.html">DSTR</a> library;
<a name="l00874"></a>00874         TDS_TINYINT encryption_level;
<a name="l00875"></a>00875 
<a name="l00876"></a>00876         TDS_INT query_timeout;
<a name="l00877"></a>00877         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> capabilities[TDS_MAX_CAPABILITY];
<a name="l00878"></a>00878         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> option_flag2;
<a name="l00879"></a>00879         <a class="code" href="a00100.html">DSTR</a> client_charset;
<a name="l00880"></a>00880 
<a name="l00881"></a><a class="code" href="a00094.html#ae0ea92f4187656e008957c55c370da46">00881</a>         <a class="code" href="a00100.html">DSTR</a> <a class="code" href="a00094.html#ae0ea92f4187656e008957c55c370da46" title="ip of server">ip_addr</a>;           
<a name="l00882"></a>00882         <a class="code" href="a00100.html">DSTR</a> instance_name;
<a name="l00883"></a>00883         <a class="code" href="a00100.html">DSTR</a> database;
<a name="l00884"></a>00884         <a class="code" href="a00100.html">DSTR</a> dump_file;
<a name="l00885"></a>00885         <span class="keywordtype">int</span> debug_flags;
<a name="l00886"></a>00886         <span class="keywordtype">int</span> text_size;
<a name="l00887"></a>00887         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> broken_dates:1;
<a name="l00888"></a>00888         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> emul_little_endian:1;
<a name="l00889"></a>00889         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bulk_copy:1;
<a name="l00890"></a>00890         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> suppress_language:1;
<a name="l00891"></a>00891         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> gssapi_use_delegation:1;
<a name="l00892"></a>00892         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> use_ntlmv2:1;
<a name="l00893"></a>00893 } <a class="code" href="a00094.html">TDSCONNECTION</a>;
<a name="l00894"></a>00894 
<a name="l00895"></a><a class="code" href="a00106.html">00895</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00106.html">tds_locale</a>
<a name="l00896"></a>00896 {
<a name="l00897"></a>00897         <span class="keywordtype">char</span> *language;
<a name="l00898"></a>00898         <span class="keywordtype">char</span> *server_charset;
<a name="l00899"></a>00899         <span class="keywordtype">char</span> *date_fmt;
<a name="l00900"></a>00900 } <a class="code" href="a00106.html">TDSLOCALE</a>;
<a name="l00901"></a>00901 
<a name="l00906"></a><a class="code" href="a00091.html">00906</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00091.html" title="Information about blobs (e.g.">tds_blob</a>
<a name="l00907"></a>00907 {
<a name="l00908"></a>00908         TDS_CHAR *textvalue;
<a name="l00909"></a>00909         TDS_CHAR textptr[16];
<a name="l00910"></a>00910         TDS_CHAR timestamp[8];
<a name="l00911"></a>00911 } <a class="code" href="a00091.html" title="Information about blobs (e.g.">TDSBLOB</a>;
<a name="l00912"></a>00912 
<a name="l00916"></a><a class="code" href="a00126.html">00916</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00126.html" title="Store variant informations.">tds_variant</a>
<a name="l00917"></a>00917 {
<a name="l00918"></a>00918         <span class="comment">/* this MUST have same position and place of textvalue in tds_blob */</span>
<a name="l00919"></a>00919         TDS_CHAR *data;
<a name="l00920"></a>00920         TDS_INT size;
<a name="l00921"></a>00921         TDS_INT data_len;
<a name="l00922"></a>00922         TDS_UCHAR type;
<a name="l00923"></a>00923         TDS_UCHAR collation[5];
<a name="l00924"></a>00924 } <a class="code" href="a00126.html" title="Store variant informations.">TDSVARIANT</a>;
<a name="l00925"></a>00925 
<a name="l00929"></a><a class="code" href="a00085.html">00929</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00930"></a>00930 {
<a name="l00931"></a>00931         TDS_USMALLINT locale_id;        <span class="comment">/* master..syslanguages.lcid */</span>
<a name="l00932"></a>00932         TDS_USMALLINT flags;
<a name="l00933"></a>00933         TDS_UCHAR charset_id;           <span class="comment">/* or zero */</span>
<a name="l00934"></a>00934 } <a class="code" href="a00085.html" title="TDS 8.0 collation informations.">TDS8_COLLATION</a>;
<a name="l00935"></a>00935 
<a name="l00936"></a>00936 <span class="comment">/* SF stands for &quot;sort flag&quot; */</span>
<a name="l00937"></a>00937 <span class="preprocessor">#define TDS_SF_BIN                   (TDS_USMALLINT) 0x100</span>
<a name="l00938"></a>00938 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SF_WIDTH_INSENSITIVE     (TDS_USMALLINT) 0x080</span>
<a name="l00939"></a>00939 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SF_KATATYPE_INSENSITIVE  (TDS_USMALLINT) 0x040</span>
<a name="l00940"></a>00940 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SF_ACCENT_SENSITIVE      (TDS_USMALLINT) 0x020</span>
<a name="l00941"></a>00941 <span class="preprocessor"></span><span class="preprocessor">#define TDS_SF_CASE_INSENSITIVE      (TDS_USMALLINT) 0x010</span>
<a name="l00942"></a>00942 <span class="preprocessor"></span>
<a name="l00943"></a>00943 <span class="comment">/* UT stands for user type */</span>
<a name="l00944"></a>00944 <span class="preprocessor">#define TDS_UT_TIMESTAMP             80</span>
<a name="l00945"></a>00945 <span class="preprocessor"></span>
<a name="l00946"></a>00946 
<a name="l00951"></a><a class="code" href="a00102.html">00951</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00102.html" title="Information relevant to libiconv.">tds_encoding</a>
<a name="l00952"></a>00952 {
<a name="l00953"></a>00953         <span class="keyword">const</span> <span class="keywordtype">char</span> *name;
<a name="l00954"></a>00954         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> min_bytes_per_char;
<a name="l00955"></a>00955         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> max_bytes_per_char;
<a name="l00956"></a>00956         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> canonic;
<a name="l00957"></a>00957 } <a class="code" href="a00102.html" title="Information relevant to libiconv.">TDS_ENCODING</a>;
<a name="l00958"></a>00958 
<a name="l00959"></a><a class="code" href="a00089.html">00959</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00089.html">tds_bcpcoldata</a>
<a name="l00960"></a>00960 {
<a name="l00961"></a>00961         TDS_UCHAR *data;
<a name="l00962"></a>00962         TDS_INT    datalen;
<a name="l00963"></a>00963         TDS_INT    is_null;
<a name="l00964"></a>00964 } <a class="code" href="a00089.html">BCPCOLDATA</a>;
<a name="l00965"></a>00965 
<a name="l00966"></a>00966 
<a name="l00967"></a>00967 <span class="keyword">enum</span>
<a name="l00968"></a>00968 { TDS_SYSNAME_SIZE = 512 };
<a name="l00969"></a>00969 
<a name="l00973"></a><a class="code" href="a00092.html">00973</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00092.html" title="Metadata about columns in regular and compute rows.">tds_column</a>
<a name="l00974"></a>00974 {
<a name="l00975"></a><a class="code" href="a00092.html#af6d0def414a911f259e907860736b506">00975</a>         TDS_SMALLINT <a class="code" href="a00092.html#af6d0def414a911f259e907860736b506" title="This type can be different from wire type because conversion (e.g.">column_type</a>;       
<a name="l00980"></a>00980         TDS_INT column_usertype;
<a name="l00981"></a>00981         TDS_INT column_flags;
<a name="l00982"></a>00982 
<a name="l00983"></a><a class="code" href="a00092.html#a2c2756c00a1099c82d4cfa4da2894672">00983</a>         TDS_INT <a class="code" href="a00092.html#a2c2756c00a1099c82d4cfa4da2894672" title="maximun size of data.">column_size</a>;            
<a name="l00985"></a><a class="code" href="a00092.html#a12914f03ee2f24fa3fe577060410770d">00985</a>         TDS_TINYINT <a class="code" href="a00092.html#a12914f03ee2f24fa3fe577060410770d" title="size of length when reading from wire (0, 1, 2 or 4)">column_varint_size</a>; 
<a name="l00987"></a><a class="code" href="a00092.html#a7ae346f8b1fdd364749825ca0863d166">00987</a>         TDS_TINYINT <a class="code" href="a00092.html#a7ae346f8b1fdd364749825ca0863d166" title="precision for decimal/numeric">column_prec</a>;        
<a name="l00988"></a><a class="code" href="a00092.html#ab73b012b3a9f08da8661dc230ec17d7f">00988</a>         TDS_TINYINT <a class="code" href="a00092.html#ab73b012b3a9f08da8661dc230ec17d7f" title="scale for decimal/numeric">column_scale</a>;       
<a name="l00990"></a><a class="code" href="a00092.html#acbc2ffb0cdbf78fa33b2307b6e250a88">00990</a>         TDS_SMALLINT <a class="code" href="a00092.html#acbc2ffb0cdbf78fa33b2307b6e250a88" title="length of column name">column_namelen</a>;    
<a name="l00991"></a>00991         TDS_SMALLINT table_namelen;
<a name="l00992"></a>00992         <span class="keyword">struct</span>
<a name="l00993"></a>00993         {
<a name="l00994"></a>00994                 TDS_SMALLINT <a class="code" href="a00092.html#af6d0def414a911f259e907860736b506" title="This type can be different from wire type because conversion (e.g.">column_type</a>;       
<a name="l00995"></a>00995                 TDS_INT <a class="code" href="a00092.html#a2c2756c00a1099c82d4cfa4da2894672" title="maximun size of data.">column_size</a>;
<a name="l00996"></a>00996         } on_server;
<a name="l00997"></a>00997 
<a name="l00998"></a><a class="code" href="a00092.html#ab3afb8272401bdb51064cdf910334159">00998</a>         <a class="code" href="a00130.html">TDSICONV</a> *<a class="code" href="a00092.html#ab3afb8272401bdb51064cdf910334159" title="refers to previously allocated iconv information">char_conv</a>;    
<a name="l01000"></a>01000         TDS_CHAR table_name[TDS_SYSNAME_SIZE];
<a name="l01001"></a>01001         TDS_CHAR column_name[TDS_SYSNAME_SIZE];
<a name="l01002"></a>01002         <span class="keywordtype">char</span> * table_column_name;
<a name="l01003"></a>01003 
<a name="l01004"></a>01004         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *column_data;
<a name="l01005"></a>01005         void (*column_data_free)(<span class="keyword">struct </span><a class="code" href="a00092.html" title="Metadata about columns in regular and compute rows.">tds_column</a> *column);
<a name="l01006"></a>01006         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> column_nullable:1;
<a name="l01007"></a>01007         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> column_writeable:1;
<a name="l01008"></a>01008         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> column_identity:1;
<a name="l01009"></a>01009         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> column_key:1;
<a name="l01010"></a>01010         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> column_hidden:1;
<a name="l01011"></a>01011         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> column_output:1;
<a name="l01012"></a>01012         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> column_timestamp:1;
<a name="l01013"></a>01013         TDS_UCHAR column_collation[5];
<a name="l01014"></a>01014 
<a name="l01015"></a>01015         <span class="comment">/* additional fields flags for compute results */</span>
<a name="l01016"></a>01016         TDS_TINYINT column_operator;
<a name="l01017"></a>01017         TDS_SMALLINT column_operand;
<a name="l01018"></a>01018 
<a name="l01019"></a>01019         <span class="comment">/* FIXME this is data related, not column */</span>
<a name="l01021"></a><a class="code" href="a00092.html#ada14ba479a67762fc1bef78910ef4beb">01021</a>         TDS_INT <a class="code" href="a00092.html#ada14ba479a67762fc1bef78910ef4beb" title="size written in variable (ie: char, text, binary).">column_cur_size</a>;
<a name="l01022"></a>01022 
<a name="l01023"></a>01023         <span class="comment">/* related to binding or info stored by client libraries */</span>
<a name="l01024"></a>01024         <span class="comment">/* FIXME find a best place to store these data, some are unused */</span>
<a name="l01025"></a>01025         TDS_SMALLINT column_bindtype;
<a name="l01026"></a>01026         TDS_SMALLINT column_bindfmt;
<a name="l01027"></a>01027         TDS_UINT column_bindlen;
<a name="l01028"></a>01028         TDS_SMALLINT *column_nullbind;
<a name="l01029"></a>01029         TDS_CHAR *column_varaddr;
<a name="l01030"></a>01030         TDS_INT *column_lenbind;
<a name="l01031"></a>01031         TDS_INT column_textpos;
<a name="l01032"></a>01032         TDS_INT column_text_sqlgetdatapos;
<a name="l01033"></a>01033         TDS_CHAR column_text_sqlputdatainfo;
<a name="l01034"></a>01034 
<a name="l01035"></a>01035         <a class="code" href="a00089.html">BCPCOLDATA</a> *bcp_column_data;
<a name="l01044"></a><a class="code" href="a00092.html#a07d747c0592ff37eb467ba14c4dcaeb2">01044</a>         TDS_INT <a class="code" href="a00092.html#a07d747c0592ff37eb467ba14c4dcaeb2" title="The length, in bytes, of any length prefix this column may have.">bcp_prefix_len</a>;
<a name="l01045"></a>01045         TDS_INT bcp_term_len;
<a name="l01046"></a>01046         TDS_CHAR *bcp_terminator;
<a name="l01047"></a>01047 } <a class="code" href="a00092.html" title="Metadata about columns in regular and compute rows.">TDSCOLUMN</a>;
<a name="l01048"></a>01048 
<a name="l01049"></a>01049 
<a name="l01051"></a><a class="code" href="a00118.html">01051</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00118.html" title="Hold information for any results.">tds_result_info</a>
<a name="l01052"></a>01052 {
<a name="l01053"></a>01053         <span class="comment">/* TODO those fields can became a struct */</span>
<a name="l01054"></a>01054         TDS_SMALLINT num_cols;
<a name="l01055"></a>01055         <a class="code" href="a00092.html" title="Metadata about columns in regular and compute rows.">TDSCOLUMN</a> **columns;
<a name="l01056"></a>01056         TDS_INT row_size;
<a name="l01057"></a>01057         TDS_INT ref_count;
<a name="l01058"></a>01058         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *current_row;
<a name="l01059"></a>01059         void (*row_free)(<span class="keyword">struct </span><a class="code" href="a00118.html" title="Hold information for any results.">tds_result_info</a>* result, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *row);
<a name="l01060"></a>01060 
<a name="l01061"></a>01061         TDS_SMALLINT rows_exist;
<a name="l01062"></a>01062         <span class="comment">/* TODO remove ?? used only in dblib */</span>
<a name="l01063"></a>01063         TDS_INT row_count;
<a name="l01064"></a>01064         <span class="comment">/* TODO remove ?? used only in dblib */</span>
<a name="l01065"></a>01065         TDS_TINYINT more_results;
<a name="l01066"></a>01066         TDS_SMALLINT computeid;
<a name="l01067"></a>01067         TDS_SMALLINT *bycolumns;
<a name="l01068"></a>01068         TDS_SMALLINT by_cols;
<a name="l01069"></a>01069 } <a class="code" href="a00118.html" title="Hold information for any results.">TDSRESULTINFO</a>;
<a name="l01070"></a>01070 
<a name="l01072"></a><a class="code" href="a00159.html#a4fa5fe915f5b796690c577a55dd71a17">01072</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="a00159.html#a4fa5fe915f5b796690c577a55dd71a17" title="values for tds-&amp;gt;state">_TDS_STATE</a>
<a name="l01073"></a>01073 {
<a name="l01074"></a><a class="code" href="a00159.html#a4fa5fe915f5b796690c577a55dd71a17ad1586abc1f75b7f3d640b994afe310e9">01074</a>         <a class="code" href="a00159.html#a4fa5fe915f5b796690c577a55dd71a17ad1586abc1f75b7f3d640b994afe310e9" title="no data expected">TDS_IDLE</a>,       
<a name="l01075"></a><a class="code" href="a00159.html#a4fa5fe915f5b796690c577a55dd71a17a8450793c640d04e225eebb463cbc85f9">01075</a>         <a class="code" href="a00159.html#a4fa5fe915f5b796690c577a55dd71a17a8450793c640d04e225eebb463cbc85f9" title="client is sending request">TDS_QUERYING</a>,   
<a name="l01076"></a><a class="code" href="a00159.html#a4fa5fe915f5b796690c577a55dd71a17a00f6d5ac5560f2f44661e599241849a8">01076</a>         <a class="code" href="a00159.html#a4fa5fe915f5b796690c577a55dd71a17a00f6d5ac5560f2f44661e599241849a8" title="cilent is waiting for data">TDS_PENDING</a>,    
<a name="l01077"></a><a class="code" href="a00159.html#a4fa5fe915f5b796690c577a55dd71a17a36ddbc8f326d6b297009a8fafd958529">01077</a>         <a class="code" href="a00159.html#a4fa5fe915f5b796690c577a55dd71a17a36ddbc8f326d6b297009a8fafd958529" title="client is reading data">TDS_READING</a>,    
<a name="l01078"></a><a class="code" href="a00159.html#a4fa5fe915f5b796690c577a55dd71a17af087b64970a1fb35bbcf1bc6ea7a643d">01078</a>         <a class="code" href="a00159.html#a4fa5fe915f5b796690c577a55dd71a17af087b64970a1fb35bbcf1bc6ea7a643d" title="no connection">TDS_DEAD</a>        
<a name="l01079"></a>01079 } <a class="code" href="a00159.html#a308f3ed720cd14dd930da56cf5e71f6e" title="values for tds-&amp;gt;state">TDS_STATE</a>;
<a name="l01080"></a>01080 
<a name="l01081"></a>01081 <span class="preprocessor">#define TDS_DBG_LOGIN   __FILE__, ((__LINE__ &lt;&lt; 4) | 11)</span>
<a name="l01082"></a>01082 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBG_HEADER  __FILE__, ((__LINE__ &lt;&lt; 4) | 10)</span>
<a name="l01083"></a>01083 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBG_FUNC    __FILE__, ((__LINE__ &lt;&lt; 4) |  7)</span>
<a name="l01084"></a>01084 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBG_INFO2   __FILE__, ((__LINE__ &lt;&lt; 4) |  6)</span>
<a name="l01085"></a>01085 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBG_INFO1   __FILE__, ((__LINE__ &lt;&lt; 4) |  5)</span>
<a name="l01086"></a>01086 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBG_NETWORK __FILE__, ((__LINE__ &lt;&lt; 4) |  4)</span>
<a name="l01087"></a>01087 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBG_WARN    __FILE__, ((__LINE__ &lt;&lt; 4) |  3)</span>
<a name="l01088"></a>01088 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBG_ERROR   __FILE__, ((__LINE__ &lt;&lt; 4) |  2)</span>
<a name="l01089"></a>01089 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBG_SEVERE  __FILE__, ((__LINE__ &lt;&lt; 4) |  1)</span>
<a name="l01090"></a>01090 <span class="preprocessor"></span>
<a name="l01091"></a>01091 <span class="preprocessor">#define TDS_DBGFLAG_FUNC    0x80</span>
<a name="l01092"></a>01092 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBGFLAG_INFO2   0x40</span>
<a name="l01093"></a>01093 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBGFLAG_INFO1   0x20</span>
<a name="l01094"></a>01094 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBGFLAG_NETWORK 0x10</span>
<a name="l01095"></a>01095 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBGFLAG_WARN    0x08</span>
<a name="l01096"></a>01096 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBGFLAG_ERROR   0x04</span>
<a name="l01097"></a>01097 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBGFLAG_SEVERE  0x02</span>
<a name="l01098"></a>01098 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBGFLAG_ALL     0xfff</span>
<a name="l01099"></a>01099 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBGFLAG_LOGIN   0x0800</span>
<a name="l01100"></a>01100 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBGFLAG_HEADER  0x0400</span>
<a name="l01101"></a>01101 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBGFLAG_PID     0x1000</span>
<a name="l01102"></a>01102 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBGFLAG_TIME    0x2000</span>
<a name="l01103"></a>01103 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBGFLAG_SOURCE  0x4000</span>
<a name="l01104"></a>01104 <span class="preprocessor"></span><span class="preprocessor">#define TDS_DBGFLAG_THREAD  0x8000</span>
<a name="l01105"></a>01105 <span class="preprocessor"></span>
<a name="l01106"></a>01106 <span class="preprocessor">#if 0</span>
<a name="l01107"></a>01107 <span class="preprocessor"></span>
<a name="l01112"></a>01112 <span class="keyword">enum</span> TDS_DBG_LOG_STATE
<a name="l01113"></a>01113 {
<a name="l01114"></a>01114           TDS_DBG_LOGIN =  (1 &lt;&lt; 0)     
<a name="l01116"></a>01116         , TDS_DBG_API =    (1 &lt;&lt; 1)     
<a name="l01117"></a>01117         , TDS_DBG_ASYNC =  (1 &lt;&lt; 2)     
<a name="l01118"></a>01118         , TDS_DBG_DIAG =   (1 &lt;&lt; 3)     
<a name="l01119"></a>01119         , TDS_DBG_error =  (1 &lt;&lt; 4)
<a name="l01120"></a>01120         <span class="comment">/* TODO:  ^^^^^ make upper case when old #defines (above) are removed */</span>
<a name="l01121"></a>01121         <span class="comment">/* Log FreeTDS runtime/logic error occurs. */</span>
<a name="l01122"></a>01122         , TDS_DBG_PACKET = (1 &lt;&lt; 5)     
<a name="l01123"></a>01123         , TDS_DBG_LIBTDS = (1 &lt;&lt; 6)     
<a name="l01124"></a>01124         , TDS_DBG_CONFIG = (1 &lt;&lt; 7)     
<a name="l01125"></a>01125         , TDS_DBG_DEFAULT = 0xFE        
<a name="l01126"></a>01126 };
<a name="l01127"></a>01127 <span class="preprocessor">#endif</span>
<a name="l01128"></a>01128 <span class="preprocessor"></span>
<a name="l01129"></a>01129 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00118.html" title="Hold information for any results.">tds_result_info</a> <a class="code" href="a00118.html" title="Hold information for any results.">TDSCOMPUTEINFO</a>;
<a name="l01130"></a>01130 
<a name="l01131"></a>01131 <span class="keyword">typedef</span> <a class="code" href="a00118.html" title="Hold information for any results.">TDSRESULTINFO</a> <a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a>;
<a name="l01132"></a>01132 
<a name="l01133"></a><a class="code" href="a00108.html">01133</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00108.html">tds_message</a>
<a name="l01134"></a>01134 {
<a name="l01135"></a>01135         TDS_CHAR *server;
<a name="l01136"></a>01136         TDS_CHAR *message;
<a name="l01137"></a>01137         TDS_CHAR *proc_name;
<a name="l01138"></a>01138         TDS_CHAR *sql_state;
<a name="l01139"></a>01139         TDS_UINT msgno;
<a name="l01140"></a>01140         TDS_INT line_number;
<a name="l01141"></a>01141         <span class="comment">/* -1 .. 255 */</span>
<a name="l01142"></a>01142         TDS_SMALLINT state;
<a name="l01143"></a>01143         TDS_TINYINT priv_msg_type;
<a name="l01144"></a>01144         TDS_TINYINT severity;
<a name="l01145"></a>01145         <span class="comment">/* for library-generated errors */</span>
<a name="l01146"></a>01146         <span class="keywordtype">int</span> oserr;
<a name="l01147"></a>01147 } <a class="code" href="a00108.html">TDSMESSAGE</a>;
<a name="l01148"></a>01148 
<a name="l01149"></a><a class="code" href="a00125.html">01149</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00125.html">tds_upd_col</a>
<a name="l01150"></a>01150 {
<a name="l01151"></a>01151         <span class="keyword">struct </span><a class="code" href="a00125.html">tds_upd_col</a> *next;       
<a name="l01152"></a>01152         TDS_INT colnamelength;
<a name="l01153"></a>01153         <span class="keywordtype">char</span> * columnname;
<a name="l01154"></a>01154 } <a class="code" href="a00125.html">TDSUPDCOL</a>;
<a name="l01155"></a>01155 
<a name="l01156"></a>01156 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l01157"></a>01157           TDS_CURSOR_STATE_UNACTIONED = 0       <span class="comment">/* initial value */</span>
<a name="l01158"></a>01158         , TDS_CURSOR_STATE_REQUESTED = 1        <span class="comment">/* called by ct_cursor */</span> 
<a name="l01159"></a>01159         , TDS_CURSOR_STATE_SENT = 2             <span class="comment">/* sent to server */</span>
<a name="l01160"></a>01160         , TDS_CURSOR_STATE_ACTIONED = 3         <span class="comment">/* acknowledged by server */</span>
<a name="l01161"></a>01161 } TDS_CURSOR_STATE;
<a name="l01162"></a>01162 
<a name="l01163"></a><a class="code" href="a00097.html">01163</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00097.html">tds_cursor_status</a>
<a name="l01164"></a>01164 {
<a name="l01165"></a>01165         TDS_CURSOR_STATE declare;
<a name="l01166"></a>01166         TDS_CURSOR_STATE cursor_row;
<a name="l01167"></a>01167         TDS_CURSOR_STATE open;
<a name="l01168"></a>01168         TDS_CURSOR_STATE fetch;
<a name="l01169"></a>01169         TDS_CURSOR_STATE close; 
<a name="l01170"></a>01170         TDS_CURSOR_STATE dealloc;
<a name="l01171"></a>01171 } <a class="code" href="a00097.html">TDS_CURSOR_STATUS</a>;
<a name="l01172"></a>01172 
<a name="l01173"></a>01173 <span class="keyword">typedef</span> <span class="keyword">enum</span> tds_cursor_operation
<a name="l01174"></a>01174 {
<a name="l01175"></a>01175         TDS_CURSOR_POSITION = 0,
<a name="l01176"></a>01176         TDS_CURSOR_UPDATE = 1,
<a name="l01177"></a>01177         TDS_CURSOR_DELETE = 2,
<a name="l01178"></a>01178         TDS_CURSOR_INSERT = 4
<a name="l01179"></a>01179 } TDS_CURSOR_OPERATION;
<a name="l01180"></a>01180 
<a name="l01181"></a>01181 <span class="keyword">typedef</span> <span class="keyword">enum</span> tds_cursor_fetch
<a name="l01182"></a>01182 {
<a name="l01183"></a>01183         TDS_CURSOR_FETCH_NEXT = 1,
<a name="l01184"></a>01184         TDS_CURSOR_FETCH_PREV,
<a name="l01185"></a>01185         TDS_CURSOR_FETCH_FIRST,
<a name="l01186"></a>01186         TDS_CURSOR_FETCH_LAST,
<a name="l01187"></a>01187         TDS_CURSOR_FETCH_ABSOLUTE,
<a name="l01188"></a>01188         TDS_CURSOR_FETCH_RELATIVE
<a name="l01189"></a>01189 } TDS_CURSOR_FETCH;
<a name="l01190"></a>01190 
<a name="l01194"></a><a class="code" href="a00096.html">01194</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00096.html" title="Holds informations about a cursor.">tds_cursor</a>
<a name="l01195"></a>01195 {
<a name="l01196"></a><a class="code" href="a00096.html#a8743877d9147d83ef0ae64e04c8a46fb">01196</a>         <span class="keyword">struct </span><a class="code" href="a00096.html" title="Holds informations about a cursor.">tds_cursor</a> *<a class="code" href="a00096.html#a8743877d9147d83ef0ae64e04c8a46fb" title="next in linked list, keep first">next</a>;        
<a name="l01197"></a><a class="code" href="a00096.html#a692ccceff71d836df0d084ec26123c2d">01197</a>         TDS_INT <a class="code" href="a00096.html#a692ccceff71d836df0d084ec26123c2d" title="reference counter so client can retain safely a pointer">ref_count</a>;              
<a name="l01198"></a><a class="code" href="a00096.html#a757c6e976b96aeea0752e68492f5b3a2">01198</a>         TDS_TINYINT <a class="code" href="a00096.html#a757c6e976b96aeea0752e68492f5b3a2" title="length of cursor name &amp;gt; 0 and &amp;lt;= 30">cursor_name_len</a>;    
<a name="l01199"></a><a class="code" href="a00096.html#afd459125b5c4d4ccbf77a7d6ca8a4aaa">01199</a>         <span class="keywordtype">char</span> *<a class="code" href="a00096.html#afd459125b5c4d4ccbf77a7d6ca8a4aaa" title="name of the cursor">cursor_name</a>;              
<a name="l01200"></a><a class="code" href="a00096.html#a7b7d4cedf0cc7f890133f021d18af58c">01200</a>         TDS_INT <a class="code" href="a00096.html#a7b7d4cedf0cc7f890133f021d18af58c" title="cursor id returned by the server after cursor declare">cursor_id</a>;              
<a name="l01201"></a><a class="code" href="a00096.html#a1be9f69f84a6d83ce86380c33a2bf9f8">01201</a>         TDS_TINYINT <a class="code" href="a00096.html#a1be9f69f84a6d83ce86380c33a2bf9f8" title="read only|updatable">options</a>;            
<a name="l01202"></a><a class="code" href="a00096.html#ad2b3362f65d1b6f2b4b6f94513dbcf08">01202</a>         TDS_TINYINT <a class="code" href="a00096.html#ad2b3362f65d1b6f2b4b6f94513dbcf08" title="cursor parameters exists ?">hasargs</a>;            
<a name="l01203"></a><a class="code" href="a00096.html#a062a1a5306aef74ceb8dd445260b06f9">01203</a>         TDS_USMALLINT <a class="code" href="a00096.html#a062a1a5306aef74ceb8dd445260b06f9" title="SQL query length.">query_len</a>;        
<a name="l01204"></a><a class="code" href="a00096.html#aeec2a01af48693b8b22449f15725d502">01204</a>         <span class="keywordtype">char</span> *<a class="code" href="a00096.html#aeec2a01af48693b8b22449f15725d502" title="SQL query.">query</a>;                    
<a name="l01205"></a>01205         <span class="comment">/* TODO for updatable columns */</span>
<a name="l01206"></a>01206         <span class="comment">/* TDS_TINYINT number_upd_cols; */</span>      
<a name="l01207"></a>01207         <span class="comment">/* TDSUPDCOL *cur_col_list; */</span>  
<a name="l01208"></a><a class="code" href="a00096.html#a7ec745adff5b2391e609e836c9f010cd">01208</a>         TDS_INT <a class="code" href="a00096.html#a7ec745adff5b2391e609e836c9f010cd" title="&amp;lt; number of updatable columns">cursor_rows</a>;            
<a name="l01209"></a>01209         <span class="comment">/* TDSPARAMINFO *params; */</span>     
<a name="l01210"></a><a class="code" href="a00096.html#ab5d6a587ac5780f001d383d4b874852f">01210</a>         <a class="code" href="a00097.html">TDS_CURSOR_STATUS</a> <a class="code" href="a00096.html#ab5d6a587ac5780f001d383d4b874852f" title="cursor parameter">status</a>;
<a name="l01211"></a>01211         TDS_SMALLINT srv_status;
<a name="l01212"></a>01212         <a class="code" href="a00118.html" title="Hold information for any results.">TDSRESULTINFO</a> *res_info;        
<a name="l01213"></a><a class="code" href="a00096.html#a889aafdde1d57c9be0585326022831f0">01213</a>         TDS_INT <a class="code" href="a00096.html#a889aafdde1d57c9be0585326022831f0" title="row fetched from this cursor">type</a>, concurrency;
<a name="l01214"></a>01214 } <a class="code" href="a00096.html" title="Holds informations about a cursor.">TDSCURSOR</a>;
<a name="l01215"></a>01215 
<a name="l01219"></a><a class="code" href="a00103.html">01219</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00103.html" title="Current environment as reported by the server.">tds_env</a>
<a name="l01220"></a>01220 {
<a name="l01221"></a>01221         <span class="keywordtype">int</span> block_size;
<a name="l01222"></a>01222         <span class="keywordtype">char</span> *language;
<a name="l01223"></a>01223         <span class="keywordtype">char</span> *charset;
<a name="l01224"></a>01224         <span class="keywordtype">char</span> *database;
<a name="l01225"></a>01225 } <a class="code" href="a00103.html" title="Current environment as reported by the server.">TDSENV</a>;
<a name="l01226"></a>01226 
<a name="l01230"></a><a class="code" href="a00101.html">01230</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00101.html" title="Holds information for a dynamic (also called prepared) query.">tds_dynamic</a>
<a name="l01231"></a>01231 {
<a name="l01232"></a><a class="code" href="a00101.html#adc93b94b6b4caf15dcf45297d928a8da">01232</a>         <span class="keyword">struct </span><a class="code" href="a00101.html" title="Holds information for a dynamic (also called prepared) query.">tds_dynamic</a> *<a class="code" href="a00101.html#adc93b94b6b4caf15dcf45297d928a8da" title="next in linked list, keep first">next</a>;       
<a name="l01238"></a><a class="code" href="a00101.html#a72332750aee80a0a94c92b35d7263d76">01238</a>         <span class="keywordtype">char</span> <span class="keywordtype">id</span>[30];
<a name="l01239"></a>01239         <span class="comment">/* int dyn_state; */</span> <span class="comment">/* TODO use it */</span>
<a name="l01241"></a><a class="code" href="a00101.html#af6fd2355838cce1689fb0e04724b7b6a">01241</a>         TDS_INT <a class="code" href="a00101.html#af6fd2355838cce1689fb0e04724b7b6a" title="numeric id for mssql7+">num_id</a>;
<a name="l01242"></a><a class="code" href="a00101.html#ac736e163c0d4cdbca980a861214d99e7">01242</a>         <a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a> *<a class="code" href="a00101.html#ac736e163c0d4cdbca980a861214d99e7" title="query results">res_info</a>; 
<a name="l01250"></a><a class="code" href="a00101.html#adba427a655336d0b128cdec36544464b">01250</a>         <a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a> *<a class="code" href="a00101.html#adba427a655336d0b128cdec36544464b" title="query parameters.">params</a>;
<a name="l01256"></a><a class="code" href="a00101.html#a73de21171e7d6fac5e38449bf1e9037d">01256</a>         <span class="keywordtype">int</span> <a class="code" href="a00101.html#a73de21171e7d6fac5e38449bf1e9037d" title="this dynamic query cannot be prepared so libTDS have to construct a simple query...">emulated</a>;
<a name="l01258"></a><a class="code" href="a00101.html#a1cee141e5f7045e691eec830cec1c158">01258</a>         <span class="keywordtype">char</span> *<a class="code" href="a00101.html#a1cee141e5f7045e691eec830cec1c158" title="saved query, we need to know original query if prepare is impossible">query</a>;
<a name="l01259"></a>01259 } <a class="code" href="a00101.html" title="Holds information for a dynamic (also called prepared) query.">TDSDYNAMIC</a>;
<a name="l01260"></a>01260 
<a name="l01261"></a>01261 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l01262"></a>01262         TDS_MULTIPLE_QUERY,
<a name="l01263"></a>01263         TDS_MULTIPLE_EXECUTE,
<a name="l01264"></a>01264         TDS_MULTIPLE_RPC
<a name="l01265"></a>01265 } TDS_MULTIPLE_TYPE;
<a name="l01266"></a>01266 
<a name="l01267"></a><a class="code" href="a00110.html">01267</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00110.html">tds_multiple</a>
<a name="l01268"></a>01268 {
<a name="l01269"></a>01269         TDS_MULTIPLE_TYPE type;
<a name="l01270"></a>01270         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> flags;
<a name="l01271"></a>01271 } <a class="code" href="a00110.html">TDSMULTIPLE</a>;
<a name="l01272"></a>01272 
<a name="l01273"></a>01273 <span class="comment">/* forward declaration */</span>
<a name="l01274"></a>01274 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00095.html">tds_context</a> <a class="code" href="a00095.html">TDSCONTEXT</a>;
<a name="l01275"></a>01275 <span class="keyword">typedef</span> int (*err_handler_t) (<span class="keyword">const</span> <a class="code" href="a00095.html">TDSCONTEXT</a> *, <a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *, <a class="code" href="a00108.html">TDSMESSAGE</a> *);
<a name="l01276"></a>01276 
<a name="l01277"></a><a class="code" href="a00095.html">01277</a> <span class="keyword">struct </span><a class="code" href="a00095.html">tds_context</a>
<a name="l01278"></a>01278 {
<a name="l01279"></a>01279         <a class="code" href="a00106.html">TDSLOCALE</a> *locale;
<a name="l01280"></a>01280         <span class="keywordtype">void</span> *parent;
<a name="l01281"></a>01281         <span class="comment">/* handlers */</span>
<a name="l01282"></a>01282         int (*msg_handler) (<span class="keyword">const</span> <a class="code" href="a00095.html">TDSCONTEXT</a> *, <a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *, <a class="code" href="a00108.html">TDSMESSAGE</a> *);
<a name="l01283"></a>01283         int (*err_handler) (<span class="keyword">const</span> <a class="code" href="a00095.html">TDSCONTEXT</a> *, <a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *, <a class="code" href="a00108.html">TDSMESSAGE</a> *);
<a name="l01284"></a>01284         int (*int_handler) (<span class="keywordtype">void</span> *);
<a name="l01285"></a>01285 };
<a name="l01286"></a>01286 
<a name="l01287"></a>01287 <span class="keyword">enum</span> TDS_ICONV_ENTRY
<a name="l01288"></a>01288 { 
<a name="l01289"></a>01289           client2ucs2
<a name="l01290"></a>01290         , client2server_chardata
<a name="l01291"></a>01291         , iso2server_metadata
<a name="l01292"></a>01292         , initial_char_conv_count       <span class="comment">/* keep last */</span>
<a name="l01293"></a>01293 };
<a name="l01294"></a>01294 
<a name="l01295"></a><a class="code" href="a00088.html">01295</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00088.html">tds_authentication</a>
<a name="l01296"></a>01296 {
<a name="l01297"></a>01297         TDS_UCHAR *packet;
<a name="l01298"></a>01298         <span class="keywordtype">int</span> packet_len;
<a name="l01299"></a>01299         int (*free)(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">struct </span><a class="code" href="a00088.html">tds_authentication</a> * auth);
<a name="l01300"></a>01300         int (*handle_next)(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">struct </span><a class="code" href="a00088.html">tds_authentication</a> * auth, <span class="keywordtype">size_t</span> len);
<a name="l01301"></a>01301 } <a class="code" href="a00088.html">TDSAUTHENTICATION</a>;
<a name="l01302"></a>01302 
<a name="l01306"></a><a class="code" href="a00122.html">01306</a> <span class="keyword">struct </span><a class="code" href="a00122.html" title="Information for a server connection.">tds_socket</a>
<a name="l01307"></a>01307 {
<a name="l01308"></a><a class="code" href="a00122.html#ad3c941ce75ee41878a99e0ef75092051">01308</a>         TDS_SYS_SOCKET <a class="code" href="a00122.html#ad3c941ce75ee41878a99e0ef75092051" title="tcp socket, INVALID_SOCKET if not connected">s</a>;               
<a name="l01310"></a>01310         TDS_USMALLINT tds_version;
<a name="l01311"></a><a class="code" href="a00122.html#a0d7cf749557ce144a6b84eb9ad07b3fc">01311</a>         TDS_UINT <a class="code" href="a00122.html#a0d7cf749557ce144a6b84eb9ad07b3fc" title="version of product (Sybase/MS and full version)">product_version</a>;       
<a name="l01312"></a>01312         <span class="keywordtype">char</span> *product_name;
<a name="l01313"></a>01313 
<a name="l01314"></a>01314         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> capabilities[TDS_MAX_CAPABILITY];
<a name="l01315"></a>01315         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> broken_dates:1;
<a name="l01316"></a>01316         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> emul_little_endian:1;
<a name="l01317"></a>01317         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> use_iconv:1;
<a name="l01318"></a>01318         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> tds71rev1:1;
<a name="l01319"></a>01319 
<a name="l01320"></a><a class="code" href="a00122.html#a24c1995f6e8d0f9a5990998524b00b6b">01320</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="a00122.html#a24c1995f6e8d0f9a5990998524b00b6b" title="input buffer">in_buf</a>;          
<a name="l01321"></a><a class="code" href="a00122.html#ad6b5121e435d22d640a645b98833cb9d">01321</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="a00122.html#ad6b5121e435d22d640a645b98833cb9d" title="output buffer">out_buf</a>;         
<a name="l01322"></a><a class="code" href="a00122.html#a65dc38f8f6f76fceaf16fda86c6fafb6">01322</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="a00122.html#a65dc38f8f6f76fceaf16fda86c6fafb6" title="allocated input buffer">in_buf_max</a>;        
<a name="l01323"></a><a class="code" href="a00122.html#a9d1b4fc8e1e801fdc703ee7bb68d9838">01323</a>         <span class="keywordtype">unsigned</span> <a class="code" href="a00122.html#a9d1b4fc8e1e801fdc703ee7bb68d9838" title="current position in in_buf">in_pos</a>;                
<a name="l01324"></a><a class="code" href="a00122.html#a426adbd80f29f477377e42e8f78d3ff0">01324</a>         <span class="keywordtype">unsigned</span> <a class="code" href="a00122.html#a426adbd80f29f477377e42e8f78d3ff0" title="current position in out_buf">out_pos</a>;               
<a name="l01325"></a><a class="code" href="a00122.html#a0b6e65b9d00b3a4efbf78b2d866cca20">01325</a>         <span class="keywordtype">unsigned</span> <a class="code" href="a00122.html#a0b6e65b9d00b3a4efbf78b2d866cca20" title="input buffer length">in_len</a>;                
<a name="l01327"></a><a class="code" href="a00122.html#a765e007b69a2e188c989f05a689f6a11">01327</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00122.html#a765e007b69a2e188c989f05a689f6a11" title="input buffer type">in_flag</a>;          
<a name="l01328"></a><a class="code" href="a00122.html#a9bb663ee7c71f56f1602cbfcd993018c">01328</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00122.html#a9bb663ee7c71f56f1602cbfcd993018c" title="output buffer type">out_flag</a>;         
<a name="l01329"></a>01329         <span class="keywordtype">void</span> *parent;
<a name="l01330"></a>01330 
<a name="l01336"></a><a class="code" href="a00122.html#a4b77fb56b92b93e413fcbb8ba5633ce4">01336</a>         <a class="code" href="a00118.html" title="Hold information for any results.">TDSRESULTINFO</a> *<a class="code" href="a00122.html#a4b77fb56b92b93e413fcbb8ba5633ce4" title="Current query information.">current_results</a>;
<a name="l01337"></a>01337         <a class="code" href="a00118.html" title="Hold information for any results.">TDSRESULTINFO</a> *res_info;
<a name="l01338"></a>01338         TDS_INT num_comp_info;
<a name="l01339"></a>01339         <a class="code" href="a00118.html" title="Hold information for any results.">TDSCOMPUTEINFO</a> **comp_info;
<a name="l01340"></a>01340         <a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a> *param_info;
<a name="l01341"></a><a class="code" href="a00122.html#aa708effeb88270302ab5524f0c0366ac">01341</a>         <a class="code" href="a00096.html" title="Holds informations about a cursor.">TDSCURSOR</a> *<a class="code" href="a00122.html#aa708effeb88270302ab5524f0c0366ac" title="cursor in use">cur_cursor</a>;          
<a name="l01342"></a><a class="code" href="a00122.html#a69220c8504b2247282e47d04bfccda38">01342</a>         <a class="code" href="a00096.html" title="Holds informations about a cursor.">TDSCURSOR</a> *<a class="code" href="a00122.html#a69220c8504b2247282e47d04bfccda38" title="linked list of cursors allocated for this connection">cursors</a>;             
<a name="l01343"></a><a class="code" href="a00122.html#a75ab58b901d242ae27e36bd39b23a54f">01343</a>         TDS_TINYINT <a class="code" href="a00122.html#a75ab58b901d242ae27e36bd39b23a54f" title="true is ret_status is valid">has_status</a>;         
<a name="l01344"></a><a class="code" href="a00122.html#a355e0b8c6219908747f82cd7482c6efb">01344</a>         TDS_INT <a class="code" href="a00122.html#a355e0b8c6219908747f82cd7482c6efb" title="return status from store procedure">ret_status</a>;             
<a name="l01345"></a>01345         <a class="code" href="a00159.html#a308f3ed720cd14dd930da56cf5e71f6e" title="values for tds-&amp;gt;state">TDS_STATE</a> state;
<a name="l01346"></a>01346 
<a name="l01347"></a>01347         <span class="keyword">volatile</span> 
<a name="l01348"></a><a class="code" href="a00122.html#ae67d850cfbedf6b1e6b02111d4388d42">01348</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00122.html#ae67d850cfbedf6b1e6b02111d4388d42" title="indicate we are waiting a cancel reply; discard tokens till acknowledge">in_cancel</a>;        
<a name="l01350"></a><a class="code" href="a00122.html#a803e29dabc76d35227f5de2488f29877">01350</a>         TDS_INT8 <a class="code" href="a00122.html#a803e29dabc76d35227f5de2488f29877" title="rows updated/deleted/inserted/selected, TDS_NO_COUNT if not valid">rows_affected</a>;         
<a name="l01351"></a>01351         TDS_INT query_timeout;
<a name="l01352"></a>01352         <a class="code" href="a00103.html" title="Current environment as reported by the server.">TDSENV</a> env;
<a name="l01353"></a>01353 
<a name="l01354"></a><a class="code" href="a00122.html#afb404985164205ebdc9b0c18fabb47e2">01354</a>         <a class="code" href="a00101.html" title="Holds information for a dynamic (also called prepared) query.">TDSDYNAMIC</a> *<a class="code" href="a00122.html#afb404985164205ebdc9b0c18fabb47e2" title="dynamic structure in use">cur_dyn</a>;            
<a name="l01355"></a><a class="code" href="a00122.html#a3ce2da581aba9192f6162e96741604ce">01355</a>         <a class="code" href="a00101.html" title="Holds information for a dynamic (also called prepared) query.">TDSDYNAMIC</a> *<a class="code" href="a00122.html#a3ce2da581aba9192f6162e96741604ce" title="list of dynamic allocate for this connection">dyns</a>;               
<a name="l01357"></a>01357         <span class="keyword">const</span> <a class="code" href="a00095.html">TDSCONTEXT</a> *tds_ctx;
<a name="l01358"></a>01358         <span class="keywordtype">int</span> char_conv_count;
<a name="l01359"></a>01359         <a class="code" href="a00130.html">TDSICONV</a> **char_convs;
<a name="l01360"></a>01360 
<a name="l01361"></a><a class="code" href="a00122.html#a1cb506c54c4a76c528c97a91aa3f1144">01361</a>         <a class="code" href="a00094.html">TDSCONNECTION</a> *<a class="code" href="a00122.html#a1cb506c54c4a76c528c97a91aa3f1144" title="config for login stuff.">connection</a>;      
<a name="l01363"></a>01363         <span class="keywordtype">int</span> spid;
<a name="l01364"></a>01364         TDS_UCHAR collation[5];
<a name="l01365"></a>01365         TDS_UCHAR tds9_transaction[8];
<a name="l01366"></a>01366         void (*env_chg_func) (<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keywordtype">int</span> type, <span class="keywordtype">char</span> *oldval, <span class="keywordtype">char</span> *newval);
<a name="l01367"></a>01367         <span class="keywordtype">int</span> internal_sp_called;
<a name="l01368"></a>01368 
<a name="l01369"></a>01369         <span class="keywordtype">void</span> *tls_session;
<a name="l01370"></a>01370         <span class="keywordtype">void</span> *tls_credentials;
<a name="l01371"></a>01371         <a class="code" href="a00088.html">TDSAUTHENTICATION</a> *authentication;
<a name="l01372"></a>01372         <span class="keywordtype">int</span> option_value;
<a name="l01373"></a>01373 };
<a name="l01374"></a>01374 
<a name="l01375"></a>01375 <span class="keywordtype">int</span> tds_init_write_buf(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01376"></a>01376 <span class="keywordtype">void</span> tds_free_result_info(<a class="code" href="a00118.html" title="Hold information for any results.">TDSRESULTINFO</a> * info);
<a name="l01377"></a>01377 <span class="keywordtype">void</span> tds_free_socket(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01378"></a>01378 <span class="keywordtype">void</span> tds_free_connection(<a class="code" href="a00094.html">TDSCONNECTION</a> * connection);
<a name="l01379"></a>01379 <span class="keywordtype">void</span> tds_free_all_results(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01380"></a>01380 <span class="keywordtype">void</span> tds_free_results(<a class="code" href="a00118.html" title="Hold information for any results.">TDSRESULTINFO</a> * res_info);
<a name="l01381"></a>01381 <span class="keywordtype">void</span> tds_free_param_results(<a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a> * param_info);
<a name="l01382"></a>01382 <span class="keywordtype">void</span> <a class="code" href="a00300.html#ga66cd6e3c5089ced9415a8a0e258d205a" title="Delete latest parameter.">tds_free_param_result</a>(<a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a> * param_info);
<a name="l01383"></a>01383 <span class="keywordtype">void</span> tds_free_msg(<a class="code" href="a00108.html">TDSMESSAGE</a> * message);
<a name="l01384"></a>01384 <span class="keywordtype">void</span> tds_cursor_deallocated(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds, <a class="code" href="a00096.html" title="Holds informations about a cursor.">TDSCURSOR</a> *cursor);
<a name="l01385"></a>01385 <span class="keywordtype">void</span> tds_release_cursor(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds, <a class="code" href="a00096.html" title="Holds informations about a cursor.">TDSCURSOR</a> *cursor);
<a name="l01386"></a>01386 <span class="keywordtype">void</span> tds_free_bcp_column_data(<a class="code" href="a00089.html">BCPCOLDATA</a> * coldata);
<a name="l01387"></a>01387 
<a name="l01388"></a>01388 <span class="keywordtype">int</span> tds_put_n(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">const</span> <span class="keywordtype">void</span> *buf, <span class="keywordtype">size_t</span> n);
<a name="l01389"></a>01389 <span class="keywordtype">int</span> <a class="code" href="a00302.html#ga1fcaf8d488cc1390f106ce3ad0bf37b4" title="Output a string to wire automatic translate string to unicode if needed.">tds_put_string</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">const</span> <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> len);
<a name="l01390"></a>01390 <span class="keywordtype">int</span> tds_put_int(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, TDS_INT i);
<a name="l01391"></a>01391 <span class="keywordtype">int</span> tds_put_int8(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, TDS_INT8 i);
<a name="l01392"></a>01392 <span class="keywordtype">int</span> tds_put_smallint(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, TDS_SMALLINT si);
<a name="l01394"></a><a class="code" href="a00159.html#adfc186758f4c1856c01746b5436aff74">01394</a> <span class="preprocessor">#define tds_put_tinyint(tds, ti) tds_put_byte(tds,ti)</span>
<a name="l01395"></a>01395 <span class="preprocessor"></span><span class="keywordtype">int</span> tds_put_byte(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> c);
<a name="l01396"></a>01396 <a class="code" href="a00118.html" title="Hold information for any results.">TDSRESULTINFO</a> *tds_alloc_results(<span class="keywordtype">int</span> num_cols);
<a name="l01397"></a>01397 <a class="code" href="a00118.html" title="Hold information for any results.">TDSCOMPUTEINFO</a> **tds_alloc_compute_results(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keywordtype">int</span> num_cols, <span class="keywordtype">int</span> by_cols);
<a name="l01398"></a>01398 <a class="code" href="a00095.html">TDSCONTEXT</a> *tds_alloc_context(<span class="keywordtype">void</span> * parent);
<a name="l01399"></a>01399 <span class="keywordtype">void</span> tds_free_context(<a class="code" href="a00095.html">TDSCONTEXT</a> * locale);
<a name="l01400"></a>01400 <a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds_alloc_socket(<a class="code" href="a00095.html">TDSCONTEXT</a> * context, <span class="keywordtype">int</span> bufsize);
<a name="l01401"></a>01401 
<a name="l01402"></a>01402 <span class="comment">/* config.c */</span>
<a name="l01403"></a>01403 <span class="keywordtype">int</span> tds_default_port(<span class="keywordtype">int</span> major, <span class="keywordtype">int</span> minor);
<a name="l01404"></a>01404 <span class="keyword">const</span> <a class="code" href="a00093.html" title="A structure to hold all the compile-time settings.">TDS_COMPILETIME_SETTINGS</a> *<a class="code" href="a00297.html#ga860690ac47a80f74c83b25cbd8d7703d" title="Return a structure capturing the compile-time settings provided to the configure...">tds_get_compiletime_settings</a>(<span class="keywordtype">void</span>);
<a name="l01405"></a>01405 <span class="keyword">typedef</span> void (*TDSCONFPARSE) (<span class="keyword">const</span> <span class="keywordtype">char</span> *option, <span class="keyword">const</span> <span class="keywordtype">char</span> *value, <span class="keywordtype">void</span> *param);
<a name="l01406"></a>01406 <span class="keywordtype">int</span> <a class="code" href="a00297.html#ga6580a3a0a6063c8095a3c4405061e068" title="Read a section of configuration file (INI style file).">tds_read_conf_section</a>(FILE * in, <span class="keyword">const</span> <span class="keywordtype">char</span> *section, TDSCONFPARSE tds_conf_parse, <span class="keywordtype">void</span> *parse_param);
<a name="l01407"></a>01407 <span class="keywordtype">int</span> <a class="code" href="a00297.html#gaac3f1471754edaaa2ab95b0a31fbf17e" title="Read configuration info for given server return 0 on error.">tds_read_conf_file</a>(<a class="code" href="a00094.html">TDSCONNECTION</a> * connection, <span class="keyword">const</span> <span class="keywordtype">char</span> *server);
<a name="l01408"></a>01408 <span class="keywordtype">void</span> tds_parse_conf_section(<span class="keyword">const</span> <span class="keywordtype">char</span> *option, <span class="keyword">const</span> <span class="keywordtype">char</span> *value, <span class="keywordtype">void</span> *param);
<a name="l01409"></a>01409 <a class="code" href="a00094.html">TDSCONNECTION</a> *<a class="code" href="a00297.html#ga03612ea81c8a94144818b813b126d4ff" title="tds_read_config_info() will fill the tds connection structure based on configuration...">tds_read_config_info</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00107.html">TDSLOGIN</a> * login, <a class="code" href="a00106.html">TDSLOCALE</a> * locale);
<a name="l01410"></a>01410 <span class="keywordtype">void</span> <a class="code" href="a00297.html#ga48a24de61ee487c736a8775937b8493c" title="Fix configuration after reading it.">tds_fix_connection</a>(<a class="code" href="a00094.html">TDSCONNECTION</a> * connection);
<a name="l01411"></a>01411 TDS_USMALLINT <a class="code" href="a00297.html#ga662970d69d4ab4880a734a774f10f754" title="Set TDS version from given string.">tds_config_verstr</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *tdsver, <a class="code" href="a00094.html">TDSCONNECTION</a> * connection);
<a name="l01412"></a>01412 <span class="keywordtype">int</span> <a class="code" href="a00297.html#ga9098567ae179fa9f5ab117d36947f993" title="Get the IP address for a hostname.">tds_lookup_host</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *servername, <span class="keywordtype">char</span> *ip);
<a name="l01413"></a>01413 <span class="keywordtype">int</span> <a class="code" href="a00297.html#ga5c7db4ea00d307c2637349ed0799675d" title="Set the full name of interface file.">tds_set_interfaces_file_loc</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *interfloc);
<a name="l01414"></a>01414 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span> STD_DATETIME_FMT[];
<a name="l01415"></a>01415 <span class="keywordtype">int</span> tds_config_boolean(<span class="keyword">const</span> <span class="keywordtype">char</span> *value);
<a name="l01416"></a>01416 
<a name="l01417"></a>01417 <a class="code" href="a00106.html">TDSLOCALE</a> *tds_get_locale(<span class="keywordtype">void</span>);
<a name="l01418"></a>01418 <span class="keywordtype">int</span> <a class="code" href="a00300.html#ga2593825c7b2d819c32043e3130724d83" title="Allocate space for row store return NULL on out of memory.">tds_alloc_row</a>(<a class="code" href="a00118.html" title="Hold information for any results.">TDSRESULTINFO</a> * res_info);
<a name="l01419"></a>01419 <span class="keywordtype">int</span> tds_alloc_compute_row(<a class="code" href="a00118.html" title="Hold information for any results.">TDSCOMPUTEINFO</a> * res_info);
<a name="l01420"></a>01420 <a class="code" href="a00089.html">BCPCOLDATA</a> * tds_alloc_bcp_column_data(<span class="keywordtype">int</span> column_size);
<a name="l01421"></a>01421 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *tds7_crypt_pass(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *clear_pass, <span class="keywordtype">size_t</span> len, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *crypt_pass);
<a name="l01422"></a>01422 <a class="code" href="a00101.html" title="Holds information for a dynamic (also called prepared) query.">TDSDYNAMIC</a> *<a class="code" href="a00304.html#ga6c0a61982dc123b9f817c99f8d5c051c" title="Find a dynamic given string id.">tds_lookup_dynamic</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">id</span>);
<a name="l01423"></a>01423 <span class="comment">/*@observer@*/</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *tds_prtype(<span class="keywordtype">int</span> token);
<a name="l01424"></a>01424 <span class="keywordtype">int</span> tds_get_varint_size(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keywordtype">int</span> datatype);
<a name="l01425"></a>01425 <span class="keywordtype">int</span> tds_get_cardinal_type(<span class="keywordtype">int</span> datatype, <span class="keywordtype">int</span> usertype);
<a name="l01426"></a>01426 
<a name="l01427"></a>01427 
<a name="l01428"></a>01428 
<a name="l01429"></a>01429 <span class="comment">/* iconv.c */</span>
<a name="l01430"></a>01430 <span class="keywordtype">void</span> tds_iconv_open(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">const</span> <span class="keywordtype">char</span> *charset);
<a name="l01431"></a>01431 <span class="keywordtype">void</span> tds_iconv_close(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01432"></a>01432 <span class="keywordtype">void</span> tds_srv_charset_changed(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">const</span> <span class="keywordtype">char</span> *charset);
<a name="l01433"></a>01433 <span class="keywordtype">void</span> tds7_srv_charset_changed(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keywordtype">int</span> sql_collate, <span class="keywordtype">int</span> lcid);
<a name="l01434"></a>01434 <span class="keywordtype">int</span> tds_iconv_alloc(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01435"></a>01435 <span class="keywordtype">void</span> tds_iconv_free(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01436"></a>01436 <a class="code" href="a00130.html">TDSICONV</a> *<a class="code" href="a00299.html#ga03199e1e4cdbf14c670e27b548e64104" title="Get iconv information from a LCID (to support different column encoding under MSSQL2K)...">tds_iconv_from_collate</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, TDS_UCHAR collate[5]);
<a name="l01437"></a>01437 
<a name="l01438"></a>01438 <span class="comment">/* threadsafe.c */</span>
<a name="l01439"></a>01439 <span class="keywordtype">char</span> *tds_timestamp_str(<span class="keywordtype">char</span> *str, <span class="keywordtype">int</span> maxlen);
<a name="l01440"></a>01440 <span class="keyword">struct </span>tm *tds_localtime_r(<span class="keyword">const</span> time_t *timep, <span class="keyword">struct</span> tm *result);
<a name="l01441"></a>01441 <span class="keyword">struct </span>hostent *tds_gethostbyname_r(<span class="keyword">const</span> <span class="keywordtype">char</span> *servername, <span class="keyword">struct</span> hostent *result, <span class="keywordtype">char</span> *buffer, <span class="keywordtype">int</span> buflen, <span class="keywordtype">int</span> *h_errnop);
<a name="l01442"></a>01442 <span class="keyword">struct </span>hostent *tds_gethostbyaddr_r(<span class="keyword">const</span> <span class="keywordtype">char</span> *addr, <span class="keywordtype">int</span> len, <span class="keywordtype">int</span> type, <span class="keyword">struct</span> hostent *result, <span class="keywordtype">char</span> *buffer, <span class="keywordtype">int</span> buflen,
<a name="l01443"></a>01443                                     <span class="keywordtype">int</span> *h_errnop);
<a name="l01444"></a>01444 <span class="keyword">struct </span>servent *tds_getservbyname_r(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">const</span> <span class="keywordtype">char</span> *proto, <span class="keyword">struct</span> servent *result, <span class="keywordtype">char</span> *buffer, <span class="keywordtype">int</span> buflen);
<a name="l01445"></a>01445 <span class="preprocessor">#ifdef INADDR_NONE</span>
<a name="l01446"></a>01446 <span class="preprocessor"></span><span class="keyword">const</span> <span class="keywordtype">char</span> *tds_inet_ntoa_r(<span class="keyword">struct</span> in_addr iaddr, <span class="keywordtype">char</span> *ip, <span class="keywordtype">size_t</span> len);
<a name="l01447"></a>01447 <span class="preprocessor">#endif</span>
<a name="l01448"></a>01448 <span class="preprocessor"></span><span class="keywordtype">char</span> *tds_get_homedir(<span class="keywordtype">void</span>);
<a name="l01449"></a>01449 
<a name="l01450"></a>01450 <span class="comment">/* mem.c */</span>
<a name="l01451"></a>01451 <a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a> *<a class="code" href="a00300.html#ga314c65c067570dc1ef3e58bbfc4eb763" title="Adds a output parameter to TDSPARAMINFO.">tds_alloc_param_result</a>(<a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a> * old_param);
<a name="l01452"></a>01452 <span class="keywordtype">void</span> <a class="code" href="a00300.html#gabdc5fee73b22345c02ab894e49ad7f95" title="Frees all allocated input parameters of a dynamic statement.">tds_free_input_params</a>(<a class="code" href="a00101.html" title="Holds information for a dynamic (also called prepared) query.">TDSDYNAMIC</a> * dyn);
<a name="l01453"></a>01453 <span class="keywordtype">void</span> <a class="code" href="a00300.html#gaee50cf5388ae905357beab1459446179" title="Frees dynamic statement and remove from TDS.">tds_free_dynamic</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00101.html" title="Holds information for a dynamic (also called prepared) query.">TDSDYNAMIC</a> * dyn);
<a name="l01454"></a>01454 <a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds_realloc_socket(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keywordtype">size_t</span> bufsize);
<a name="l01455"></a>01455 <span class="keywordtype">char</span> *tds_alloc_client_sqlstate(<span class="keywordtype">int</span> msgno);
<a name="l01456"></a>01456 <span class="keywordtype">char</span> *tds_alloc_lookup_sqlstate(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keywordtype">int</span> msgno);
<a name="l01457"></a>01457 <a class="code" href="a00107.html">TDSLOGIN</a> *tds_alloc_login(<span class="keywordtype">void</span>);
<a name="l01458"></a>01458 <a class="code" href="a00101.html" title="Holds information for a dynamic (also called prepared) query.">TDSDYNAMIC</a> *<a class="code" href="a00300.html#gabce856d3fe501d44fe6533b537f2740b" title="Allocate a dynamic statement.">tds_alloc_dynamic</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">id</span>);
<a name="l01459"></a>01459 <span class="keywordtype">void</span> tds_free_login(<a class="code" href="a00107.html">TDSLOGIN</a> * login);
<a name="l01460"></a>01460 <a class="code" href="a00094.html">TDSCONNECTION</a> *<a class="code" href="a00300.html#gac2aac38d0e71f0131af07dedaa5c99cc" title="Allocate space for configure structure and initialize with default values.">tds_alloc_connection</a>(<a class="code" href="a00106.html">TDSLOCALE</a> * locale);
<a name="l01461"></a>01461 <a class="code" href="a00106.html">TDSLOCALE</a> *tds_alloc_locale(<span class="keywordtype">void</span>);
<a name="l01462"></a>01462 <span class="keywordtype">void</span> *<a class="code" href="a00300.html#ga282d67682d293810625d87d566443c2d" title="Allocate data for a parameter.">tds_alloc_param_data</a>(<a class="code" href="a00092.html" title="Metadata about columns in regular and compute rows.">TDSCOLUMN</a> * curparam);
<a name="l01463"></a>01463 <span class="keywordtype">void</span> tds_free_locale(<a class="code" href="a00106.html">TDSLOCALE</a> * locale);
<a name="l01464"></a>01464 <a class="code" href="a00096.html" title="Holds informations about a cursor.">TDSCURSOR</a> * tds_alloc_cursor(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, TDS_INT namelen, <span class="keyword">const</span> <span class="keywordtype">char</span> *query, TDS_INT querylen);
<a name="l01465"></a>01465 <span class="keywordtype">void</span> tds_free_row(<a class="code" href="a00118.html" title="Hold information for any results.">TDSRESULTINFO</a> * res_info, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *row);
<a name="l01466"></a>01466 
<a name="l01467"></a>01467 <span class="comment">/* login.c */</span>
<a name="l01468"></a>01468 <span class="keywordtype">void</span> tds_set_packet(<a class="code" href="a00107.html">TDSLOGIN</a> * <a class="code" href="a00107.html">tds_login</a>, <span class="keywordtype">int</span> packet_size);
<a name="l01469"></a>01469 <span class="keywordtype">void</span> tds_set_port(<a class="code" href="a00107.html">TDSLOGIN</a> * <a class="code" href="a00107.html">tds_login</a>, <span class="keywordtype">int</span> port);
<a name="l01470"></a>01470 <span class="keywordtype">void</span> tds_set_passwd(<a class="code" href="a00107.html">TDSLOGIN</a> * <a class="code" href="a00107.html">tds_login</a>, <span class="keyword">const</span> <span class="keywordtype">char</span> *password);
<a name="l01471"></a>01471 <span class="keywordtype">void</span> tds_set_bulk(<a class="code" href="a00107.html">TDSLOGIN</a> * <a class="code" href="a00107.html">tds_login</a>, TDS_TINYINT enabled);
<a name="l01472"></a>01472 <span class="keywordtype">void</span> tds_set_user(<a class="code" href="a00107.html">TDSLOGIN</a> * <a class="code" href="a00107.html">tds_login</a>, <span class="keyword">const</span> <span class="keywordtype">char</span> *username);
<a name="l01473"></a>01473 <span class="keywordtype">void</span> tds_set_app(<a class="code" href="a00107.html">TDSLOGIN</a> * <a class="code" href="a00107.html">tds_login</a>, <span class="keyword">const</span> <span class="keywordtype">char</span> *application);
<a name="l01474"></a>01474 <span class="keywordtype">void</span> tds_set_host(<a class="code" href="a00107.html">TDSLOGIN</a> * <a class="code" href="a00107.html">tds_login</a>, <span class="keyword">const</span> <span class="keywordtype">char</span> *hostname);
<a name="l01475"></a>01475 <span class="keywordtype">void</span> tds_set_library(<a class="code" href="a00107.html">TDSLOGIN</a> * <a class="code" href="a00107.html">tds_login</a>, <span class="keyword">const</span> <span class="keywordtype">char</span> *library);
<a name="l01476"></a>01476 <span class="keywordtype">void</span> tds_set_server(<a class="code" href="a00107.html">TDSLOGIN</a> * <a class="code" href="a00107.html">tds_login</a>, <span class="keyword">const</span> <span class="keywordtype">char</span> *server);
<a name="l01477"></a>01477 <span class="keywordtype">void</span> tds_set_client_charset(<a class="code" href="a00107.html">TDSLOGIN</a> * <a class="code" href="a00107.html">tds_login</a>, <span class="keyword">const</span> <span class="keywordtype">char</span> *charset);
<a name="l01478"></a>01478 <span class="keywordtype">void</span> tds_set_language(<a class="code" href="a00107.html">TDSLOGIN</a> * <a class="code" href="a00107.html">tds_login</a>, <span class="keyword">const</span> <span class="keywordtype">char</span> *language);
<a name="l01479"></a>01479 <span class="keywordtype">void</span> tds_set_database_name(<a class="code" href="a00107.html">TDSLOGIN</a> * <a class="code" href="a00107.html">tds_login</a>, <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="a00286.html#gab185982ffe0b85b8fd19747bd1f433fe" title="Get name of current database.">dbname</a>);
<a name="l01480"></a>01480 <span class="keywordtype">void</span> tds_set_version(<a class="code" href="a00107.html">TDSLOGIN</a> * <a class="code" href="a00107.html">tds_login</a>, TDS_TINYINT major_ver, TDS_TINYINT minor_ver);
<a name="l01481"></a>01481 <span class="keywordtype">void</span> tds_set_capabilities(<a class="code" href="a00107.html">TDSLOGIN</a> * <a class="code" href="a00107.html">tds_login</a>, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *capabilities, <span class="keywordtype">int</span> size);
<a name="l01482"></a>01482 <span class="keywordtype">int</span> tds_connect_and_login(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00094.html">TDSCONNECTION</a> * connection);
<a name="l01483"></a>01483 
<a name="l01484"></a>01484 <span class="comment">/* query.c */</span>
<a name="l01485"></a>01485 <span class="keywordtype">int</span> <a class="code" href="a00301.html#ga49926242495661c63cc42820a5f530c6" title="tds_submit_query() sends a language string to the database server for processing...">tds_submit_query</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">const</span> <span class="keywordtype">char</span> *query);
<a name="l01486"></a>01486 <span class="keywordtype">int</span> <a class="code" href="a00301.html#gaf5fc35439e704b403e865fa0ed755091" title="tds_submit_query_params() sends a language string to the database server for processing...">tds_submit_query_params</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">const</span> <span class="keywordtype">char</span> *query, <a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a> * params);
<a name="l01487"></a>01487 <span class="keywordtype">int</span> tds_submit_queryf(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">const</span> <span class="keywordtype">char</span> *queryf, ...);
<a name="l01488"></a>01488 <span class="keywordtype">int</span> <a class="code" href="a00301.html#ga2120b8c0c11dfae2a755244fa77ff5dc" title="tds_submit_prepare() creates a temporary stored procedure in the server.">tds_submit_prepare</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">const</span> <span class="keywordtype">char</span> *query, <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">id</span>, <a class="code" href="a00101.html" title="Holds information for a dynamic (also called prepared) query.">TDSDYNAMIC</a> ** dyn_out, <a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a> * params);
<a name="l01489"></a>01489 <span class="keywordtype">int</span> <a class="code" href="a00301.html#gaecce368b287eeec2d797a377ae91aabd" title="Submit a prepared query with parameters.">tds_submit_execdirect</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">const</span> <span class="keywordtype">char</span> *query, <a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a> * params);
<a name="l01490"></a>01490 <span class="keywordtype">int</span> <a class="code" href="a00301.html#ga7bcb0511f7aa947a47949a635bee5e70" title="tds8_submit_prepexec() creates a temporary stored procedure in the server.">tds8_submit_prepexec</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">const</span> <span class="keywordtype">char</span> *query, <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">id</span>, <a class="code" href="a00101.html" title="Holds information for a dynamic (also called prepared) query.">TDSDYNAMIC</a> ** dyn_out, <a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a> * params);
<a name="l01491"></a>01491 <span class="keywordtype">int</span> <a class="code" href="a00301.html#ga1f3152b885df683498620e91142ec8f3" title="tds_submit_execute() sends a previously prepared dynamic statement to the server...">tds_submit_execute</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00101.html" title="Holds information for a dynamic (also called prepared) query.">TDSDYNAMIC</a> * dyn);
<a name="l01492"></a>01492 <span class="keywordtype">int</span> <a class="code" href="a00301.html#gaef0e9c7e5ba94fc3a8281bbddd291e50" title="tds_send_cancel() sends an empty packet (8 byte header only) tds_process_cancel should...">tds_send_cancel</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01493"></a>01493 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="a00301.html#ga6455b2991afbf7da90270787f2059d31" title="Get position of next placeholder.">tds_next_placeholder</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *start);
<a name="l01494"></a>01494 <span class="keywordtype">int</span> <a class="code" href="a00301.html#gaaa7b4d37bf796019e72f25c6e7fe7bea" title="Count the number of placeholders in query.">tds_count_placeholders</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *query);
<a name="l01495"></a>01495 <span class="keywordtype">int</span> tds_needs_unprepare(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00101.html" title="Holds information for a dynamic (also called prepared) query.">TDSDYNAMIC</a> * dyn);
<a name="l01496"></a>01496 <span class="keywordtype">int</span> <a class="code" href="a00301.html#ga549c6fdf63ca94aad9d8025290283d95" title="Send a unprepare request for a prepared query.">tds_submit_unprepare</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00101.html" title="Holds information for a dynamic (also called prepared) query.">TDSDYNAMIC</a> * dyn);
<a name="l01497"></a>01497 <span class="keywordtype">int</span> <a class="code" href="a00301.html#gaa01973d616c941df3766098585d8cc35" title="tds_submit_rpc() call a RPC from server.">tds_submit_rpc</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">const</span> <span class="keywordtype">char</span> *rpc_name, <a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a> * params);
<a name="l01498"></a>01498 <span class="keywordtype">int</span> tds_submit_optioncmd(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00159.html#a113928faf73e15b0e0a70b1026e90320" title="options that can be sent with a TDS_OPTIONCMD token">TDS_OPTION_CMD</a> command, TDS_OPTION option, <a class="code" href="a00112.html">TDS_OPTION_ARG</a> *param, TDS_INT param_size);
<a name="l01499"></a>01499 <span class="keywordtype">int</span> <a class="code" href="a00301.html#ga45e25770929784d202528b5ba1a5766e" title="Quote an id.">tds_quote_id</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keywordtype">char</span> *buffer, <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">id</span>, <span class="keywordtype">int</span> idlen);
<a name="l01500"></a>01500 <span class="keywordtype">int</span> <a class="code" href="a00301.html#ga0e89161b16aa6664bd9aec6b35505099" title="Quote a string.">tds_quote_string</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keywordtype">char</span> *buffer, <span class="keyword">const</span> <span class="keywordtype">char</span> *str, <span class="keywordtype">int</span> len);
<a name="l01501"></a>01501 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="a00301.html#ga5dbe51ce9533218f2da23f69ff63dda4" title="Skip quoting string (like &amp;#39;sfsf&amp;#39;, &amp;quot;dflkdj&amp;quot; or [dfkjd]).">tds_skip_quoted</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *s);
<a name="l01502"></a>01502 
<a name="l01503"></a>01503 <span class="keywordtype">int</span> tds_cursor_declare(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00096.html" title="Holds informations about a cursor.">TDSCURSOR</a> * cursor, <a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a> *params, <span class="keywordtype">int</span> *send);
<a name="l01504"></a>01504 <span class="keywordtype">int</span> tds_cursor_setrows(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00096.html" title="Holds informations about a cursor.">TDSCURSOR</a> * cursor, <span class="keywordtype">int</span> *send);
<a name="l01505"></a>01505 <span class="keywordtype">int</span> tds_cursor_open(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00096.html" title="Holds informations about a cursor.">TDSCURSOR</a> * cursor, <a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a> *params, <span class="keywordtype">int</span> *send);
<a name="l01506"></a>01506 <span class="keywordtype">int</span> tds_cursor_fetch(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00096.html" title="Holds informations about a cursor.">TDSCURSOR</a> * cursor, TDS_CURSOR_FETCH fetch_type, TDS_INT i_row);
<a name="l01507"></a>01507 <span class="keywordtype">int</span> tds_cursor_get_cursor_info(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00096.html" title="Holds informations about a cursor.">TDSCURSOR</a> * cursor, TDS_UINT * row_number, TDS_UINT * row_count);
<a name="l01508"></a>01508 <span class="keywordtype">int</span> tds_cursor_close(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00096.html" title="Holds informations about a cursor.">TDSCURSOR</a> * cursor);
<a name="l01509"></a>01509 <span class="keywordtype">int</span> <a class="code" href="a00301.html#gab39882fd832a0723b8ae909b5cc7b5ee" title="Send a deallocation request to server libTDS care for all deallocation stuff (memory...">tds_cursor_dealloc</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00096.html" title="Holds informations about a cursor.">TDSCURSOR</a> * cursor);
<a name="l01510"></a>01510 <span class="keywordtype">int</span> tds_cursor_update(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00096.html" title="Holds informations about a cursor.">TDSCURSOR</a> * cursor, TDS_CURSOR_OPERATION op, TDS_INT i_row, <a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a> * params);
<a name="l01511"></a>01511 <span class="keywordtype">int</span> tds_cursor_setname(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00096.html" title="Holds informations about a cursor.">TDSCURSOR</a> * cursor);
<a name="l01512"></a>01512 
<a name="l01513"></a>01513 <span class="keywordtype">int</span> tds_multiple_init(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds, <a class="code" href="a00110.html">TDSMULTIPLE</a> *multiple, TDS_MULTIPLE_TYPE type);
<a name="l01514"></a>01514 <span class="keywordtype">int</span> tds_multiple_done(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds, <a class="code" href="a00110.html">TDSMULTIPLE</a> *multiple);
<a name="l01515"></a>01515 <span class="keywordtype">int</span> tds_multiple_query(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds, <a class="code" href="a00110.html">TDSMULTIPLE</a> *multiple, <span class="keyword">const</span> <span class="keywordtype">char</span> *query, <a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a> * params);
<a name="l01516"></a>01516 <span class="keywordtype">int</span> tds_multiple_execute(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds, <a class="code" href="a00110.html">TDSMULTIPLE</a> *multiple, <a class="code" href="a00101.html" title="Holds information for a dynamic (also called prepared) query.">TDSDYNAMIC</a> * dyn);
<a name="l01517"></a>01517 
<a name="l01518"></a>01518 <span class="comment">/* token.c */</span>
<a name="l01519"></a>01519 <span class="keywordtype">int</span> <a class="code" href="a00304.html#ga72c312610135deb3ffd3355b5564bf72">tds_process_cancel</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01520"></a>01520 <span class="preprocessor">#ifdef WORDS_BIGENDIAN</span>
<a name="l01521"></a>01521 <span class="preprocessor"></span><span class="keywordtype">void</span> tds_swap_datatype(<span class="keywordtype">int</span> coltype, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buf);
<a name="l01522"></a>01522 <span class="preprocessor">#endif</span>
<a name="l01523"></a>01523 <span class="preprocessor"></span><span class="keywordtype">void</span> tds_swap_numeric(<a class="code" href="a00133.html">TDS_NUMERIC</a> *num);
<a name="l01524"></a>01524 <span class="keywordtype">int</span> <a class="code" href="a00304.html#ga995b82e53aeac5bede01ef16e9aeaa65" title="tds_get_token_size() returns the size of a fixed length token used by tds_process_cancel()...">tds_get_token_size</a>(<span class="keywordtype">int</span> marker);
<a name="l01525"></a>01525 <span class="keywordtype">int</span> <a class="code" href="a00304.html#gac5822f65c45d60fc403103d8241e968d" title="tds_process_login_tokens() is called after sending the login packet to the server...">tds_process_login_tokens</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01526"></a>01526 <span class="keywordtype">int</span> <a class="code" href="a00304.html#ga47118d65c41124d2e8e0a72b7680270f" title="Process results for simple query as &amp;quot;SET TEXTSIZE&amp;quot; or &amp;quot;USE dbname&amp;quot;...">tds_process_simple_query</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01527"></a>01527 <span class="keywordtype">int</span> tds5_send_optioncmd(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00159.html#a113928faf73e15b0e0a70b1026e90320" title="options that can be sent with a TDS_OPTIONCMD token">TDS_OPTION_CMD</a> tds_command, TDS_OPTION tds_option, <a class="code" href="a00112.html">TDS_OPTION_ARG</a> * tds_argument,
<a name="l01528"></a>01528                         TDS_INT * tds_argsize);
<a name="l01529"></a>01529 <span class="keywordtype">int</span> <a class="code" href="a00304.html#ga121792195f5fd8c07a0a5f2f5ae61d8c" title="process all streams.">tds_process_tokens</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="comment">/*@out@*/</span> TDS_INT * result_type, <span class="comment">/*@out@*/</span> <span class="keywordtype">int</span> *done_flags, <span class="keywordtype">unsigned</span> flag);
<a name="l01530"></a>01530 
<a name="l01531"></a>01531 <span class="comment">/* data.c */</span>
<a name="l01532"></a>01532 <span class="keywordtype">void</span> tds_set_param_type(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00092.html" title="Metadata about columns in regular and compute rows.">TDSCOLUMN</a> * curcol, TDS_SERVER_TYPE type);
<a name="l01533"></a>01533 <span class="keywordtype">void</span> tds_set_column_type(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00092.html" title="Metadata about columns in regular and compute rows.">TDSCOLUMN</a> * curcol, <span class="keywordtype">int</span> type);
<a name="l01534"></a>01534 TDS_INT tds_data_get_info(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds, <a class="code" href="a00092.html" title="Metadata about columns in regular and compute rows.">TDSCOLUMN</a> *col);
<a name="l01535"></a>01535 
<a name="l01536"></a>01536 
<a name="l01537"></a>01537 <span class="comment">/* tds_convert.c */</span>
<a name="l01538"></a>01538 TDS_INT <a class="code" href="a00298.html#gac275bf57990faed7bbf36f3e8c91fe20" title="Convert from db date format to a structured date format.">tds_datecrack</a>(TDS_INT datetype, <span class="keyword">const</span> <span class="keywordtype">void</span> *di, <a class="code" href="a00127.html" title="Used by tds_datecrack.">TDSDATEREC</a> * dr);
<a name="l01539"></a>01539 <span class="keywordtype">int</span> tds_get_conversion_type(<span class="keywordtype">int</span> srctype, <span class="keywordtype">int</span> colsize);
<a name="l01540"></a>01540 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span> tds_hex_digits[];
<a name="l01541"></a>01541 
<a name="l01542"></a>01542 <span class="comment">/* write.c */</span>
<a name="l01543"></a>01543 <span class="keywordtype">int</span> <a class="code" href="a00302.html#gaea1bfbdf47b379ddf87c1eabed9aa7a8" title="Flush packet to server.">tds_flush_packet</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01544"></a>01544 <span class="keywordtype">int</span> tds_put_buf(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> dsize, <span class="keywordtype">int</span> ssize);
<a name="l01545"></a>01545 
<a name="l01546"></a>01546 <span class="comment">/* read.c */</span>
<a name="l01547"></a>01547 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> tds_get_byte(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01548"></a>01548 <span class="keywordtype">void</span> <a class="code" href="a00302.html#gad70d59fb317d098b0c9fd29dd77131a8" title="Unget will always work as long as you don&amp;#39;t call it twice in a row.">tds_unget_byte</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01549"></a>01549 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> tds_peek(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01550"></a>01550 TDS_SMALLINT <a class="code" href="a00302.html#ga7059aa02facd9d694d034b24e7201b67" title="Get an int16 from the server.">tds_get_smallint</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01551"></a>01551 TDS_INT <a class="code" href="a00302.html#ga452e60c210309458f8a244d731e08848" title="Get an int32 from the server.">tds_get_int</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01552"></a>01552 TDS_INT8 tds_get_int8(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01553"></a>01553 <span class="keywordtype">int</span> <a class="code" href="a00302.html#ga9a76090c8f026063bc84d2a9f2154d86" title="Fetch a string from the wire.">tds_get_string</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keywordtype">int</span> string_len, <span class="keywordtype">char</span> *dest, <span class="keywordtype">size_t</span> dest_size);
<a name="l01554"></a>01554 <span class="keywordtype">int</span> <a class="code" href="a00302.html#ga94c7a01ad9071f09f0cd8013ec200220" title="Fetch character data the wire.">tds_get_char_data</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keywordtype">char</span> *dest, <span class="keywordtype">size_t</span> wire_size, <a class="code" href="a00092.html" title="Metadata about columns in regular and compute rows.">TDSCOLUMN</a> * curcol);
<a name="l01555"></a>01555 <span class="keywordtype">void</span> *<a class="code" href="a00302.html#gab007f269c45476181f6676fbc332a11b" title="Get N bytes from the buffer and return them in the already allocated space given...">tds_get_n</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="comment">/*@out@*/</span> <span class="comment">/*@null@*/</span> <span class="keywordtype">void</span> *dest, <span class="keywordtype">int</span> n);
<a name="l01556"></a>01556 <span class="keywordtype">int</span> tds_get_size_by_type(<span class="keywordtype">int</span> servertype);
<a name="l01557"></a>01557 
<a name="l01558"></a>01558 
<a name="l01559"></a>01559 <span class="comment">/* util.c */</span>
<a name="l01560"></a>01560 <span class="keywordtype">int</span> tdserror (<span class="keyword">const</span> <a class="code" href="a00095.html">TDSCONTEXT</a> * tds_ctx, <a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keywordtype">int</span> msgno, <span class="keywordtype">int</span> errnum);
<a name="l01561"></a>01561 <a class="code" href="a00159.html#a308f3ed720cd14dd930da56cf5e71f6e" title="values for tds-&amp;gt;state">TDS_STATE</a> tds_set_state(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <a class="code" href="a00159.html#a308f3ed720cd14dd930da56cf5e71f6e" title="values for tds-&amp;gt;state">TDS_STATE</a> state);
<a name="l01562"></a>01562 <span class="keywordtype">void</span> tds_set_parent(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keywordtype">void</span> *the_parent);
<a name="l01563"></a>01563 <span class="keywordtype">int</span> tds_swap_bytes(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> bytes);
<a name="l01564"></a>01564 <span class="keywordtype">int</span> tds_version(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * <a class="code" href="a00122.html" title="Information for a server connection.">tds_socket</a>, <span class="keywordtype">char</span> *pversion_string);
<a name="l01565"></a>01565 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> tds_gettime_ms(<span class="keywordtype">void</span>);
<a name="l01566"></a>01566 
<a name="l01567"></a>01567 <span class="comment">/* log.c */</span>
<a name="l01568"></a>01568 <span class="keywordtype">void</span> tdsdump_off(<span class="keywordtype">void</span>);
<a name="l01569"></a>01569 <span class="keywordtype">void</span> tdsdump_on(<span class="keywordtype">void</span>);
<a name="l01570"></a>01570 <span class="keywordtype">int</span> tdsdump_isopen(<span class="keywordtype">void</span>);
<a name="l01571"></a>01571 <span class="preprocessor">#if defined(__GNUC__) &amp;&amp; __GNUC__ &gt;= 4 &amp;&amp; !defined(__MINGW32__)</span>
<a name="l01572"></a>01572 <span class="preprocessor"></span><span class="preprocessor">#pragma GCC visibility pop</span>
<a name="l01573"></a>01573 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l01574"></a>01574 <span class="preprocessor"></span><span class="keywordtype">int</span> tdsdump_open(<span class="keyword">const</span> <span class="keywordtype">char</span> *filename);
<a name="l01575"></a>01575 <span class="preprocessor">#if defined(__GNUC__) &amp;&amp; __GNUC__ &gt;= 4 &amp;&amp; !defined(__MINGW32__)</span>
<a name="l01576"></a>01576 <span class="preprocessor"></span><span class="preprocessor">#pragma GCC visibility push(hidden)</span>
<a name="l01577"></a>01577 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l01578"></a>01578 <span class="preprocessor"></span><span class="keywordtype">void</span> tdsdump_close(<span class="keywordtype">void</span>);
<a name="l01579"></a>01579 <span class="keywordtype">void</span> tdsdump_dump_buf(<span class="keyword">const</span> <span class="keywordtype">char</span>* file, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> level_line, <span class="keyword">const</span> <span class="keywordtype">char</span> *msg, <span class="keyword">const</span> <span class="keywordtype">void</span> *buf, <span class="keywordtype">size_t</span> length);
<a name="l01580"></a>01580 <span class="keywordtype">void</span> tdsdump_col(<span class="keyword">const</span> <a class="code" href="a00092.html" title="Metadata about columns in regular and compute rows.">TDSCOLUMN</a> *col);
<a name="l01581"></a>01581 <span class="preprocessor">#undef tdsdump_log</span>
<a name="l01582"></a>01582 <span class="preprocessor"></span><span class="keywordtype">void</span> tdsdump_log(<span class="keyword">const</span> <span class="keywordtype">char</span>* file, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> level_line, <span class="keyword">const</span> <span class="keywordtype">char</span> *fmt, ...)
<a name="l01583"></a>01583 <span class="preprocessor">#if defined(__GNUC__) &amp;&amp; __GNUC__ &gt;= 2</span>
<a name="l01584"></a>01584 <span class="preprocessor"></span>        __attribute__ ((__format__ (__printf__, 3, 4)))
<a name="l01585"></a>01585 <span class="preprocessor">#endif</span>
<a name="l01586"></a>01586 <span class="preprocessor"></span>;
<a name="l01587"></a>01587 <span class="preprocessor">#define tdsdump_log if (TDS_UNLIKELY(tds_write_dump)) tdsdump_log</span>
<a name="l01588"></a>01588 <span class="preprocessor"></span>
<a name="l01589"></a>01589 <span class="keyword">extern</span> <span class="keywordtype">int</span> tds_write_dump;
<a name="l01590"></a>01590 <span class="keyword">extern</span> <span class="keywordtype">int</span> tds_debug_flags;
<a name="l01591"></a>01591 <span class="keyword">extern</span> <span class="keywordtype">int</span> tds_g_append_mode;
<a name="l01592"></a>01592 
<a name="l01593"></a>01593 <span class="comment">/* net.c */</span>
<a name="l01594"></a>01594 <span class="keywordtype">int</span> tds_lastpacket(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01595"></a>01595 TDSERRNO tds_open_socket(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keyword">const</span> <span class="keywordtype">char</span> *ip_addr, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> port, <span class="keywordtype">int</span> timeout, <span class="keywordtype">int</span> *p_oserr);
<a name="l01596"></a>01596 <span class="keywordtype">int</span> tds_close_socket(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01597"></a>01597 <span class="keywordtype">int</span> <a class="code" href="a00302.html#ga410619783bdf2bb60b0f27a5578e0e07" title="Read in one &amp;#39;packet&amp;#39; from the server.">tds_read_packet</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01598"></a>01598 <span class="keywordtype">int</span> tds_write_packet(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <span class="keyword">final</span>);
<a name="l01599"></a>01599 <span class="keywordtype">int</span> <a class="code" href="a00302.html#gaaf869a0cfbeb1f67c4b9e8b460705d3f" title="Get port of all instances.">tds7_get_instance_ports</a>(FILE *output, <span class="keyword">const</span> <span class="keywordtype">char</span> *ip_addr);
<a name="l01600"></a>01600 <span class="keywordtype">int</span> <a class="code" href="a00302.html#gab2a008268a6385c114695ee17619b293" title="Get port of given instance.">tds7_get_instance_port</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *ip_addr, <span class="keyword">const</span> <span class="keywordtype">char</span> *instance);
<a name="l01601"></a>01601 <span class="keywordtype">int</span> tds_ssl_init(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds);
<a name="l01602"></a>01602 <span class="keywordtype">void</span> tds_ssl_deinit(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds);
<a name="l01603"></a>01603 <span class="keyword">const</span> <span class="keywordtype">char</span> *tds_prwsaerror(<span class="keywordtype">int</span> erc);
<a name="l01604"></a>01604 
<a name="l01605"></a>01605 
<a name="l01606"></a>01606 
<a name="l01607"></a>01607 <span class="comment">/* vstrbuild.c */</span>
<a name="l01608"></a>01608 <span class="keywordtype">int</span> tds_vstrbuild(<span class="keywordtype">char</span> *buffer, <span class="keywordtype">int</span> buflen, <span class="keywordtype">int</span> *resultlen, <span class="keywordtype">char</span> *text, <span class="keywordtype">int</span> textlen, <span class="keyword">const</span> <span class="keywordtype">char</span> *formats, <span class="keywordtype">int</span> formatlen,
<a name="l01609"></a>01609                   va_list ap);
<a name="l01610"></a>01610 
<a name="l01611"></a>01611 <span class="comment">/* numeric.c */</span>
<a name="l01612"></a>01612 <span class="keywordtype">char</span> *tds_money_to_string(<span class="keyword">const</span> <a class="code" href="a00131.html">TDS_MONEY</a> * money, <span class="keywordtype">char</span> *s);
<a name="l01613"></a>01613 TDS_INT tds_numeric_to_string(<span class="keyword">const</span> <a class="code" href="a00133.html">TDS_NUMERIC</a> * numeric, <span class="keywordtype">char</span> *s);
<a name="l01614"></a>01614 TDS_INT tds_numeric_change_prec_scale(<a class="code" href="a00133.html">TDS_NUMERIC</a> * numeric, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> new_prec, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> new_scale);
<a name="l01615"></a>01615 
<a name="l01616"></a>01616 <span class="comment">/* getmac.c */</span>
<a name="l01617"></a>01617 <span class="keywordtype">void</span> tds_getmac(TDS_SYS_SOCKET s, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> mac[6]);
<a name="l01618"></a>01618 
<a name="l01619"></a>01619 <span class="preprocessor">#ifndef HAVE_SSPI</span>
<a name="l01620"></a>01620 <span class="preprocessor"></span><a class="code" href="a00088.html">TDSAUTHENTICATION</a> * <a class="code" href="a00296.html#ga679f2d22b4a4bdefe0fa475d63503778" title="Build a NTLMSPP packet to send to server.">tds_ntlm_get_auth</a>(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01621"></a>01621 <a class="code" href="a00088.html">TDSAUTHENTICATION</a> * tds_gss_get_auth(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01622"></a>01622 <span class="preprocessor">#else</span>
<a name="l01623"></a>01623 <span class="preprocessor"></span><a class="code" href="a00088.html">TDSAUTHENTICATION</a> * tds_sspi_get_auth(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds);
<a name="l01624"></a>01624 <span class="preprocessor">#endif</span>
<a name="l01625"></a>01625 <span class="preprocessor"></span>
<a name="l01626"></a>01626 <span class="comment">/* bulk.c */</span>
<a name="l01627"></a>01627 
<a name="l01629"></a><a class="code" href="a00159.html#ad5c5c8cb776334af4b0ebf7a0d740cb2">01629</a> <span class="keyword">enum</span> <a class="code" href="a00159.html#ad5c5c8cb776334af4b0ebf7a0d740cb2" title="bcp direction">tds_bcp_directions</a>
<a name="l01630"></a>01630 {
<a name="l01631"></a>01631         TDS_BCP_IN = 1,
<a name="l01632"></a>01632         TDS_BCP_OUT = 2,
<a name="l01633"></a>01633         TDS_BCP_QUERYOUT = 3
<a name="l01634"></a>01634 };
<a name="l01635"></a>01635 
<a name="l01636"></a><a class="code" href="a00090.html">01636</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00090.html">tds_bcpinfo</a>
<a name="l01637"></a>01637 {
<a name="l01638"></a>01638         <span class="keyword">const</span> <span class="keywordtype">char</span> *hint;
<a name="l01639"></a>01639         <span class="keywordtype">void</span> *parent;
<a name="l01640"></a>01640         TDS_CHAR *tablename;
<a name="l01641"></a>01641         TDS_CHAR *insert_stmt;
<a name="l01642"></a>01642         TDS_INT direction;
<a name="l01643"></a>01643         TDS_INT identity_insert_on;
<a name="l01644"></a>01644         TDS_INT xfer_init;
<a name="l01645"></a>01645         TDS_INT var_cols;
<a name="l01646"></a>01646         TDS_INT bind_count;
<a name="l01647"></a>01647         <a class="code" href="a00118.html" title="Hold information for any results.">TDSRESULTINFO</a> *bindinfo;
<a name="l01648"></a>01648 } <a class="code" href="a00090.html">TDSBCPINFO</a>;
<a name="l01649"></a>01649 
<a name="l01650"></a>01650 <span class="keywordtype">int</span> tds_bcp_init(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds, <a class="code" href="a00090.html">TDSBCPINFO</a> *bcpinfo);
<a name="l01651"></a>01651 <span class="keyword">typedef</span> int  (*tds_bcp_get_col_data) (<a class="code" href="a00090.html">TDSBCPINFO</a> *bulk, <a class="code" href="a00092.html" title="Metadata about columns in regular and compute rows.">TDSCOLUMN</a> *bcpcol, <span class="keywordtype">int</span> offset);
<a name="l01652"></a>01652 <span class="keyword">typedef</span> void (*tds_bcp_null_error)   (<a class="code" href="a00090.html">TDSBCPINFO</a> *bulk, <span class="keywordtype">int</span> index, <span class="keywordtype">int</span> offset);
<a name="l01653"></a>01653 <span class="keywordtype">int</span> tds_bcp_send_record(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds, <a class="code" href="a00090.html">TDSBCPINFO</a> *bcpinfo, tds_bcp_get_col_data get_col_data, tds_bcp_null_error null_error, <span class="keywordtype">int</span> offset);
<a name="l01654"></a>01654 <span class="keywordtype">int</span> tds_bcp_done(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds, <span class="keywordtype">int</span> *rows_copied);
<a name="l01655"></a>01655 <span class="keywordtype">int</span> tds_bcp_start(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds, <a class="code" href="a00090.html">TDSBCPINFO</a> *bcpinfo);
<a name="l01656"></a>01656 <span class="keywordtype">int</span> tds_bcp_start_copy_in(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds, <a class="code" href="a00090.html">TDSBCPINFO</a> *bcpinfo);
<a name="l01657"></a>01657 
<a name="l01658"></a>01658 <span class="keywordtype">int</span> tds_writetext_start(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds, <span class="keyword">const</span> <span class="keywordtype">char</span> *objname, <span class="keyword">const</span> <span class="keywordtype">char</span> *textptr, <span class="keyword">const</span> <span class="keywordtype">char</span> *timestamp, <span class="keywordtype">int</span> with_log, TDS_UINT size);
<a name="l01659"></a>01659 <span class="keywordtype">int</span> tds_writetext_continue(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds, <span class="keyword">const</span> TDS_UCHAR *text, TDS_UINT size);
<a name="l01660"></a>01660 <span class="keywordtype">int</span> tds_writetext_end(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> *tds);
<a name="l01661"></a>01661 
<a name="l01662"></a>01662 
<a name="l01663"></a>01663 <span class="preprocessor">#define IS_TDS42(x) (x-&gt;tds_version==0x402)</span>
<a name="l01664"></a>01664 <span class="preprocessor"></span><span class="preprocessor">#define IS_TDS46(x) (x-&gt;tds_version==0x406)</span>
<a name="l01665"></a>01665 <span class="preprocessor"></span><span class="preprocessor">#define IS_TDS50(x) (x-&gt;tds_version==0x500)</span>
<a name="l01666"></a>01666 <span class="preprocessor"></span><span class="preprocessor">#define IS_TDS70(x) (x-&gt;tds_version==0x700)</span>
<a name="l01667"></a>01667 <span class="preprocessor"></span><span class="preprocessor">#define IS_TDS71(x) (x-&gt;tds_version==0x701)</span>
<a name="l01668"></a>01668 <span class="preprocessor"></span><span class="preprocessor">#define IS_TDS72(x) (x-&gt;tds_version==0x702)</span>
<a name="l01669"></a>01669 <span class="preprocessor"></span>
<a name="l01670"></a>01670 <span class="preprocessor">#define IS_TDS7_PLUS(x) ((x)-&gt;tds_version&gt;=0x700)</span>
<a name="l01671"></a>01671 <span class="preprocessor"></span><span class="preprocessor">#define IS_TDS71_PLUS(x) ((x)-&gt;tds_version&gt;=0x701)</span>
<a name="l01672"></a>01672 <span class="preprocessor"></span><span class="preprocessor">#define IS_TDS72_PLUS(x) ((x)-&gt;tds_version&gt;=0x702)</span>
<a name="l01673"></a>01673 <span class="preprocessor"></span>
<a name="l01674"></a>01674 <span class="preprocessor">#define TDS_MAJOR(x) ((x)-&gt;tds_version &gt;&gt; 8)</span>
<a name="l01675"></a>01675 <span class="preprocessor"></span><span class="preprocessor">#define TDS_MINOR(x) ((x)-&gt;tds_version &amp; 0xff)</span>
<a name="l01676"></a>01676 <span class="preprocessor"></span>
<a name="l01677"></a>01677 <span class="preprocessor">#define IS_TDSDEAD(x) (((x) == NULL) || TDS_IS_SOCKET_INVALID((x)-&gt;s))</span>
<a name="l01678"></a>01678 <span class="preprocessor"></span>
<a name="l01680"></a><a class="code" href="a00159.html#a4840433488d0c66601ff4002a54b41d7">01680</a> <span class="preprocessor">#define TDS_IS_SYBASE(x) (!(x-&gt;product_version &amp; 0x80000000u))</span>
<a name="l01681"></a>01681 <span class="preprocessor"></span>
<a name="l01682"></a><a class="code" href="a00159.html#a07e9371c3e72b9e319f4c14e6fc2c20f">01682</a> <span class="preprocessor">#define TDS_IS_MSSQL(x) ((x-&gt;product_version &amp; 0x80000000u)!=0)</span>
<a name="l01683"></a>01683 <span class="preprocessor"></span>
<a name="l01687"></a><a class="code" href="a00159.html#a1f5fb9d2184949ed566c8ce308a4e91e">01687</a> <span class="preprocessor">#define TDS_MS_VER(maj,min,x) (0x80000000u|((maj)&lt;&lt;24)|((min)&lt;&lt;16)|(x))</span>
<a name="l01688"></a>01688 <span class="preprocessor"></span>
<a name="l01689"></a>01689 <span class="comment">/* TODO test if not similar to ms one*/</span>
<a name="l01691"></a><a class="code" href="a00159.html#aca53a637849948c4b7a07f69e40c685c">01691</a> <span class="preprocessor">#define TDS_SYB_VER(maj,min,x) (((maj)&lt;&lt;24)|((min)&lt;&lt;16)|(x)&lt;&lt;8)</span>
<a name="l01692"></a>01692 <span class="preprocessor"></span>
<a name="l01693"></a>01693 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l01694"></a>01694 <span class="preprocessor"></span><span class="preprocessor">#if 0</span>
<a name="l01695"></a>01695 <span class="preprocessor"></span>{
<a name="l01696"></a>01696 <span class="preprocessor">#endif</span>
<a name="l01697"></a>01697 <span class="preprocessor"></span>}
<a name="l01698"></a>01698 <span class="preprocessor">#endif</span>
<a name="l01699"></a>01699 <span class="preprocessor"></span>
<a name="l01700"></a>01700 <span class="preprocessor">#if defined(__GNUC__) &amp;&amp; __GNUC__ &gt;= 4 &amp;&amp; !defined(__MINGW32__)</span>
<a name="l01701"></a>01701 <span class="preprocessor"></span><span class="preprocessor">#pragma GCC visibility pop</span>
<a name="l01702"></a>01702 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l01703"></a>01703 <span class="preprocessor"></span>
<a name="l01704"></a>01704 <span class="preprocessor">#define TDS_PUT_INT(tds,v) tds_put_int((tds), ((TDS_INT)(v)))</span>
<a name="l01705"></a>01705 <span class="preprocessor"></span><span class="preprocessor">#define TDS_PUT_SMALLINT(tds,v) tds_put_smallint((tds), ((TDS_SMALLINT)(v)))</span>
<a name="l01706"></a>01706 <span class="preprocessor"></span><span class="preprocessor">#define TDS_PUT_BYTE(tds,v) tds_put_byte((tds), ((unsigned char)(v)))</span>
<a name="l01707"></a>01707 <span class="preprocessor"></span>
<a name="l01708"></a>01708 <span class="preprocessor">#endif </span><span class="comment">/* _tds_h_ */</span>
</pre></div></div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address style="text-align: right;"><small>Generated on Wed Aug 17 22:22:30 2011 for FreeTDS API by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>