Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > ce0cb4aec597dde3226843045ded906f > files > 169

freetds-doc-0.91-1.fc14.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/tdsodbc.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/tdsodbc.h</h1><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) 2004-2010  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 _sql_h_</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define _sql_h_</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;<a class="code" href="a00159.html" title="Main include file for libtds.">tds.h</a>&quot;</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="preprocessor">#if defined(UNIXODBC) || defined(TDS_NO_DM)</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#include &lt;sql.h&gt;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;sqlext.h&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#ifdef UNIXODBC</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#include &lt;odbcinst.h&gt;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#endif</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* IODBC */</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;isql.h&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;isqlext.h&gt;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#ifdef HAVE_IODBCINST_H</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#include &lt;iodbcinst.h&gt;</span>
<a name="l00037"></a>00037 <span class="preprocessor">#endif </span><span class="comment">/* HAVE_IODBCINST_H */</span>
<a name="l00038"></a>00038 <span class="preprocessor">#endif</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span>
<a name="l00040"></a>00040 <span class="preprocessor">#ifndef HAVE_SQLLEN</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#ifndef SQLULEN</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#define SQLULEN SQLUINTEGER</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#ifndef SQLLEN</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#define SQLLEN SQLINTEGER</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span>
<a name="l00049"></a>00049 <span class="preprocessor">#ifndef HAVE_SQLSETPOSIROW</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#define SQLSETPOSIROW SQLUSMALLINT</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span>
<a name="l00053"></a>00053 <span class="preprocessor">#ifndef HAVE_SQLROWOFFSET</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#define SQLROWOFFSET SQLLEN</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span>
<a name="l00057"></a>00057 <span class="preprocessor">#ifndef HAVE_SQLROWSETSIZE</span>
<a name="l00058"></a>00058 <span class="preprocessor"></span><span class="preprocessor">#define SQLROWSETSIZE SQLULEN</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span>
<a name="l00061"></a>00061 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span>
<a name="l00063"></a>00063 {
<a name="l00064"></a>00064 <span class="preprocessor">#if 0</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span>}
<a name="l00066"></a>00066 <span class="preprocessor">#endif</span>
<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span>
<a name="l00069"></a>00069 <span class="comment">/* $Id: tdsodbc.h,v 1.127 2010/11/09 15:46:42 freddy77 Exp $ */</span>
<a name="l00070"></a>00070 
<a name="l00071"></a>00071 <span class="preprocessor">#if defined(__GNUC__) &amp;&amp; __GNUC__ &gt;= 4 &amp;&amp; !defined(__MINGW32__)</span>
<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor">#pragma GCC visibility push(hidden)</span>
<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#define ODBC_API SQL_API __attribute__((externally_visible))</span>
<a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#define ODBC_API SQL_API</span>
<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span>
<a name="l00078"></a>00078 <span class="preprocessor">#if (defined(_WIN32) || defined(__CYGWIN__)) &amp;&amp; defined(__GNUC__)</span>
<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#  define ODBC_PUBLIC __attribute__((dllexport))</span>
<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">#  define ODBC_PUBLIC</span>
<a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00083"></a>00083 <span class="preprocessor"></span>
<a name="l00084"></a>00084 <span class="preprocessor">#define ODBC_MAX(a,b) ( (a) &gt; (b) ? (a) : (b) )</span>
<a name="l00085"></a>00085 <span class="preprocessor"></span><span class="preprocessor">#define ODBC_MIN(a,b) ( (a) &lt; (b) ? (a) : (b) )</span>
<a name="l00086"></a>00086 <span class="preprocessor"></span>
<a name="l00087"></a><a class="code" href="a00043.html">00087</a> <span class="keyword">struct </span><a class="code" href="a00043.html">_sql_error</a>
<a name="l00088"></a>00088 {
<a name="l00089"></a>00089         <span class="keyword">const</span> <span class="keywordtype">char</span> *msg;
<a name="l00090"></a>00090         <span class="keywordtype">char</span> state2[6];
<a name="l00091"></a>00091         <span class="keywordtype">char</span> state3[6];
<a name="l00092"></a>00092         TDS_UINT native;
<a name="l00093"></a>00093         <span class="keywordtype">char</span> *server;
<a name="l00094"></a>00094         <span class="keywordtype">int</span> linenum;
<a name="l00095"></a>00095         <span class="keywordtype">int</span> msgstate;
<a name="l00096"></a>00096 };
<a name="l00097"></a>00097 
<a name="l00098"></a><a class="code" href="a00044.html">00098</a> <span class="keyword">struct </span><a class="code" href="a00044.html">_sql_errors</a>
<a name="l00099"></a>00099 {
<a name="l00100"></a>00100         <span class="keyword">struct </span><a class="code" href="a00043.html">_sql_error</a> *errs;
<a name="l00101"></a>00101         <span class="keywordtype">int</span> num_errors;
<a name="l00102"></a>00102         SQLRETURN lastrc;
<a name="l00103"></a>00103         <span class="keywordtype">char</span> ranked;
<a name="l00104"></a>00104 };
<a name="l00105"></a>00105 
<a name="l00106"></a>00106 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00044.html">_sql_errors</a> <a class="code" href="a00044.html">TDS_ERRS</a>;
<a name="l00107"></a>00107 
<a name="l00108"></a>00108 <span class="preprocessor">#if ENABLE_EXTRA_CHECKS</span>
<a name="l00109"></a>00109 <span class="preprocessor"></span><span class="keywordtype">void</span> odbc_check_struct_extra(<span class="keywordtype">void</span> *p);
<a name="l00110"></a>00110 
<a name="l00111"></a>00111 <span class="preprocessor">#define ODBC_RETURN(handle, rc) \</span>
<a name="l00112"></a>00112 <span class="preprocessor">        do { odbc_check_struct_extra(handle); return (handle-&gt;errs.lastrc = (rc)); } while(0)</span>
<a name="l00113"></a>00113 <span class="preprocessor"></span><span class="preprocessor">#define ODBC_RETURN_(handle) \</span>
<a name="l00114"></a>00114 <span class="preprocessor">        do { odbc_check_struct_extra(handle); return handle-&gt;errs.lastrc; } while(0)</span>
<a name="l00115"></a>00115 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00116"></a>00116 <span class="preprocessor"></span><span class="preprocessor">#define ODBC_RETURN(handle, rc) \</span>
<a name="l00117"></a>00117 <span class="preprocessor">        do { return (handle-&gt;errs.lastrc = (rc)); } while(0)</span>
<a name="l00118"></a>00118 <span class="preprocessor"></span><span class="preprocessor">#define ODBC_RETURN_(handle) \</span>
<a name="l00119"></a>00119 <span class="preprocessor">        do { return handle-&gt;errs.lastrc; } while(0)</span>
<a name="l00120"></a>00120 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00121"></a>00121 <span class="preprocessor"></span>
<a name="l00123"></a>00123 <span class="keywordtype">void</span> odbc_errs_reset(<span class="keyword">struct</span> <a class="code" href="a00044.html">_sql_errors</a> *errs);
<a name="l00124"></a>00124 
<a name="l00126"></a>00126 <span class="keywordtype">void</span> odbc_errs_add(<span class="keyword">struct</span> <a class="code" href="a00044.html">_sql_errors</a> *errs, <span class="keyword">const</span> <span class="keywordtype">char</span> *sqlstate, <span class="keyword">const</span> <span class="keywordtype">char</span> *msg);
<a name="l00127"></a>00127 
<a name="l00129"></a>00129 <span class="keywordtype">void</span> odbc_errs_add_rdbms(<span class="keyword">struct</span> <a class="code" href="a00044.html">_sql_errors</a> *errs, TDS_UINT native, <span class="keyword">const</span> <span class="keywordtype">char</span> *sqlstate, <span class="keyword">const</span> <span class="keywordtype">char</span> *msg, <span class="keywordtype">int</span> linenum,
<a name="l00130"></a>00130                          <span class="keywordtype">int</span> msgstate, <span class="keyword">const</span> <span class="keywordtype">char</span> *server);
<a name="l00131"></a>00131 
<a name="l00132"></a><a class="code" href="a00030.html">00132</a> <span class="keyword">struct </span><a class="code" href="a00030.html">_dheader</a>
<a name="l00133"></a>00133 {
<a name="l00134"></a>00134         SQLSMALLINT sql_desc_alloc_type;
<a name="l00135"></a>00135         SQLINTEGER sql_desc_bind_type;
<a name="l00136"></a>00136         SQLULEN sql_desc_array_size;
<a name="l00137"></a>00137         <span class="comment">/* TODO SQLLEN ?? see http://support.microsoft.com/default.aspx?scid=kb;en-us;298678 */</span>
<a name="l00138"></a>00138         SQLSMALLINT sql_desc_count;
<a name="l00139"></a>00139         SQLUSMALLINT *sql_desc_array_status_ptr;
<a name="l00140"></a>00140         SQLULEN *sql_desc_rows_processed_ptr;
<a name="l00141"></a>00141         SQLLEN *sql_desc_bind_offset_ptr;
<a name="l00142"></a>00142 };
<a name="l00143"></a>00143 
<a name="l00144"></a><a class="code" href="a00031.html">00144</a> <span class="keyword">struct </span><a class="code" href="a00031.html">_drecord</a>
<a name="l00145"></a>00145 {
<a name="l00146"></a>00146         SQLUINTEGER sql_desc_auto_unique_value;
<a name="l00147"></a>00147         <a class="code" href="a00100.html">DSTR</a> sql_desc_base_column_name;
<a name="l00148"></a>00148         <a class="code" href="a00100.html">DSTR</a> sql_desc_base_table_name;
<a name="l00149"></a>00149         SQLINTEGER sql_desc_case_sensitive;
<a name="l00150"></a>00150         <a class="code" href="a00100.html">DSTR</a> sql_desc_catalog_name;
<a name="l00151"></a>00151         SQLSMALLINT sql_desc_concise_type;
<a name="l00152"></a>00152         SQLPOINTER sql_desc_data_ptr;
<a name="l00153"></a>00153         SQLSMALLINT sql_desc_datetime_interval_code;
<a name="l00154"></a>00154         SQLINTEGER sql_desc_datetime_interval_precision;
<a name="l00155"></a>00155         SQLLEN sql_desc_display_size;
<a name="l00156"></a>00156         SQLSMALLINT sql_desc_fixed_prec_scale;
<a name="l00157"></a>00157         SQLLEN *sql_desc_indicator_ptr;
<a name="l00158"></a>00158         <a class="code" href="a00100.html">DSTR</a> sql_desc_label;
<a name="l00159"></a>00159         SQLULEN sql_desc_length;
<a name="l00160"></a>00160         <span class="comment">/* this point to a constant buffer, do not free or modify */</span>
<a name="l00161"></a>00161         <span class="keyword">const</span> <span class="keywordtype">char</span> *sql_desc_literal_prefix;
<a name="l00162"></a>00162         <span class="comment">/* this point to a constant buffer, do not free or modify */</span>
<a name="l00163"></a>00163         <span class="keyword">const</span> <span class="keywordtype">char</span> *sql_desc_literal_suffix;
<a name="l00164"></a>00164         <a class="code" href="a00100.html">DSTR</a> sql_desc_local_type_name;
<a name="l00165"></a>00165         <a class="code" href="a00100.html">DSTR</a> sql_desc_name;
<a name="l00166"></a>00166         SQLSMALLINT sql_desc_nullable;
<a name="l00167"></a>00167         SQLINTEGER sql_desc_num_prec_radix;
<a name="l00168"></a>00168         SQLLEN sql_desc_octet_length;
<a name="l00169"></a>00169         SQLLEN *sql_desc_octet_length_ptr;
<a name="l00170"></a>00170         SQLSMALLINT sql_desc_parameter_type;
<a name="l00171"></a>00171         SQLSMALLINT sql_desc_precision;
<a name="l00172"></a>00172         SQLSMALLINT sql_desc_rowver;
<a name="l00173"></a>00173         SQLSMALLINT sql_desc_scale;
<a name="l00174"></a>00174         <a class="code" href="a00100.html">DSTR</a> sql_desc_schema_name;
<a name="l00175"></a>00175         SQLSMALLINT sql_desc_searchable;
<a name="l00176"></a>00176         <a class="code" href="a00100.html">DSTR</a> sql_desc_table_name;
<a name="l00177"></a>00177         SQLSMALLINT sql_desc_type;
<a name="l00178"></a>00178         <span class="comment">/* this point to a constant buffer, do not free or modify */</span>
<a name="l00179"></a>00179         <span class="keyword">const</span> <span class="keywordtype">char</span> *sql_desc_type_name;
<a name="l00180"></a>00180         SQLSMALLINT sql_desc_unnamed;
<a name="l00181"></a>00181         SQLSMALLINT sql_desc_unsigned;
<a name="l00182"></a>00182         SQLSMALLINT sql_desc_updatable;
<a name="l00183"></a>00183 };
<a name="l00184"></a>00184 
<a name="l00185"></a><a class="code" href="a00035.html">00185</a> <span class="keyword">struct </span><a class="code" href="a00035.html">_hdesc</a>
<a name="l00186"></a>00186 {
<a name="l00187"></a>00187         SQLSMALLINT htype;      <span class="comment">/* do not reorder this field */</span>
<a name="l00188"></a>00188         <span class="keyword">struct </span><a class="code" href="a00044.html">_sql_errors</a> errs;        <span class="comment">/* do not reorder this field */</span>
<a name="l00189"></a>00189         <span class="keywordtype">int</span> type;
<a name="l00190"></a>00190         SQLHANDLE parent;
<a name="l00191"></a>00191         <span class="keyword">struct </span><a class="code" href="a00030.html">_dheader</a> header;
<a name="l00192"></a>00192         <span class="keyword">struct </span><a class="code" href="a00031.html">_drecord</a> *records;
<a name="l00193"></a>00193 };
<a name="l00194"></a>00194 
<a name="l00195"></a>00195 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00035.html">_hdesc</a> <a class="code" href="a00035.html">TDS_DESC</a>;
<a name="l00196"></a>00196 
<a name="l00197"></a>00197 <span class="preprocessor">#define DESC_IRD        1</span>
<a name="l00198"></a>00198 <span class="preprocessor"></span><span class="preprocessor">#define DESC_IPD        2</span>
<a name="l00199"></a>00199 <span class="preprocessor"></span><span class="preprocessor">#define DESC_ARD        3</span>
<a name="l00200"></a>00200 <span class="preprocessor"></span><span class="preprocessor">#define DESC_APD        4</span>
<a name="l00201"></a>00201 <span class="preprocessor"></span>
<a name="l00202"></a><a class="code" href="a00036.html">00202</a> <span class="keyword">struct </span><a class="code" href="a00036.html">_heattr</a>
<a name="l00203"></a>00203 {
<a name="l00204"></a>00204         SQLUINTEGER connection_pooling;
<a name="l00205"></a>00205         SQLUINTEGER cp_match;
<a name="l00206"></a>00206         SQLINTEGER odbc_version;
<a name="l00207"></a>00207         SQLINTEGER output_nts;
<a name="l00208"></a>00208 };
<a name="l00209"></a>00209 
<a name="l00210"></a><a class="code" href="a00033.html">00210</a> <span class="keyword">struct </span><a class="code" href="a00033.html">_hchk</a>
<a name="l00211"></a>00211 {
<a name="l00212"></a>00212         SQLSMALLINT htype;      <span class="comment">/* do not reorder this field */</span>
<a name="l00213"></a>00213         <span class="keyword">struct </span><a class="code" href="a00044.html">_sql_errors</a> errs;        <span class="comment">/* do not reorder this field */</span>
<a name="l00214"></a>00214 };
<a name="l00215"></a>00215 
<a name="l00216"></a><a class="code" href="a00037.html">00216</a> <span class="keyword">struct </span><a class="code" href="a00037.html">_henv</a>
<a name="l00217"></a>00217 {
<a name="l00218"></a>00218         SQLSMALLINT htype;      <span class="comment">/* do not reorder this field */</span>
<a name="l00219"></a>00219         <span class="keyword">struct </span><a class="code" href="a00044.html">_sql_errors</a> errs;        <span class="comment">/* do not reorder this field */</span>
<a name="l00220"></a>00220         <a class="code" href="a00095.html">TDSCONTEXT</a> *tds_ctx;
<a name="l00221"></a>00221         <span class="keyword">struct </span><a class="code" href="a00036.html">_heattr</a> attr;
<a name="l00222"></a>00222 };
<a name="l00223"></a>00223 
<a name="l00224"></a><a class="code" href="a00032.html">00224</a> <span class="keyword">struct </span><a class="code" href="a00032.html">_hcattr</a>
<a name="l00225"></a>00225 {
<a name="l00226"></a>00226         SQLUINTEGER access_mode;
<a name="l00227"></a>00227         SQLUINTEGER async_enable;
<a name="l00228"></a>00228         SQLUINTEGER auto_ipd;
<a name="l00229"></a>00229         SQLUINTEGER autocommit;
<a name="l00230"></a>00230         SQLUINTEGER connection_dead;
<a name="l00231"></a>00231         SQLUINTEGER connection_timeout;
<a name="l00232"></a>00232         <a class="code" href="a00100.html">DSTR</a> current_catalog;
<a name="l00233"></a>00233         SQLUINTEGER login_timeout;
<a name="l00234"></a>00234         SQLUINTEGER metadata_id;
<a name="l00235"></a>00235         SQLUINTEGER odbc_cursors;
<a name="l00236"></a>00236         SQLUINTEGER packet_size;
<a name="l00237"></a>00237         SQLHWND quite_mode;
<a name="l00238"></a>00238         <a class="code" href="a00100.html">DSTR</a> translate_lib;
<a name="l00239"></a>00239         SQLUINTEGER translate_option;
<a name="l00240"></a>00240         SQLUINTEGER txn_isolation;
<a name="l00241"></a>00241         SQLUINTEGER cursor_type;
<a name="l00242"></a>00242 <span class="preprocessor">#ifdef TDS_NO_DM</span>
<a name="l00243"></a>00243 <span class="preprocessor"></span>        SQLUINTEGER trace;
<a name="l00244"></a>00244         <a class="code" href="a00100.html">DSTR</a> tracefile;
<a name="l00245"></a>00245 <span class="preprocessor">#endif</span>
<a name="l00246"></a>00246 <span class="preprocessor"></span>};
<a name="l00247"></a>00247 
<a name="l00248"></a>00248 <span class="preprocessor">#define TDS_MAX_APP_DESC        100</span>
<a name="l00249"></a>00249 <span class="preprocessor"></span>
<a name="l00250"></a>00250 <span class="keyword">struct </span><a class="code" href="a00039.html">_hstmt</a>;
<a name="l00251"></a><a class="code" href="a00034.html">00251</a> <span class="keyword">struct </span><a class="code" href="a00034.html">_hdbc</a>
<a name="l00252"></a>00252 {
<a name="l00253"></a>00253         SQLSMALLINT htype;      <span class="comment">/* do not reorder this field */</span>
<a name="l00254"></a>00254         <span class="keyword">struct </span><a class="code" href="a00044.html">_sql_errors</a> errs;        <span class="comment">/* do not reorder this field */</span>
<a name="l00255"></a>00255         <span class="keyword">struct </span><a class="code" href="a00037.html">_henv</a> *env;
<a name="l00256"></a>00256         <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>;
<a name="l00257"></a>00257         <a class="code" href="a00100.html">DSTR</a> dsn;
<a name="l00258"></a>00258         <a class="code" href="a00100.html">DSTR</a> server;            <span class="comment">/* aka Instance */</span>
<a name="l00259"></a>00259 <span class="preprocessor">#ifdef ENABLE_ODBC_WIDE</span>
<a name="l00260"></a>00260 <span class="preprocessor"></span>        <a class="code" href="a00100.html">DSTR</a> original_charset;
<a name="l00261"></a>00261         <a class="code" href="a00130.html">TDSICONV</a> *mb_conv;
<a name="l00262"></a>00262 <span class="preprocessor">#endif</span>
<a name="l00263"></a>00263 <span class="preprocessor"></span>
<a name="l00269"></a><a class="code" href="a00034.html#acaf05aab946ae9dec9e06dd230839675">00269</a>         <span class="keyword">struct </span><a class="code" href="a00039.html">_hstmt</a> *<a class="code" href="a00034.html#acaf05aab946ae9dec9e06dd230839675" title="Statement executing.">current_statement</a>;
<a name="l00271"></a><a class="code" href="a00034.html#a4a9f3e8f1eba573df79a1ed300d8fc91">00271</a>         <span class="keyword">struct </span><a class="code" href="a00039.html">_hstmt</a> *<a class="code" href="a00034.html#a4a9f3e8f1eba573df79a1ed300d8fc91" title="list of all statements allocated from this connection">stmt_list</a>;
<a name="l00272"></a>00272         <span class="keyword">struct </span><a class="code" href="a00032.html">_hcattr</a> attr;
<a name="l00274"></a><a class="code" href="a00034.html#a93c0c73d7161aa0c8fd59016e66def9e">00274</a>         <a class="code" href="a00035.html">TDS_DESC</a> *<a class="code" href="a00034.html#a93c0c73d7161aa0c8fd59016e66def9e" title="descriptors associated to connection">uad</a>[TDS_MAX_APP_DESC];
<a name="l00276"></a><a class="code" href="a00034.html#ae45d3601984f4773024a81394764d28d">00276</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="a00034.html#ae45d3601984f4773024a81394764d28d" title="&amp;lt;&amp;gt;0 if server handle cursors">cursor_support</a>;
<a name="l00277"></a>00277         TDS_INT default_query_timeout;
<a name="l00278"></a>00278 };
<a name="l00279"></a>00279 
<a name="l00280"></a><a class="code" href="a00038.html">00280</a> <span class="keyword">struct </span><a class="code" href="a00038.html">_hsattr</a>
<a name="l00281"></a>00281 {
<a name="l00282"></a>00282         <span class="comment">/* TODO remove IRD, ARD, IPD, APD from statement, do not duplicate */</span>
<a name="l00283"></a>00283 <span class="comment">/*      TDS_DESC *app_row_desc; */</span>
<a name="l00284"></a>00284 <span class="comment">/*      TDS_DESC *app_param_desc; */</span>
<a name="l00285"></a>00285         SQLUINTEGER async_enable;
<a name="l00286"></a>00286         SQLUINTEGER concurrency;
<a name="l00287"></a>00287         SQLUINTEGER cursor_scrollable;
<a name="l00288"></a>00288         SQLUINTEGER cursor_sensitivity;
<a name="l00289"></a>00289         SQLUINTEGER cursor_type;
<a name="l00290"></a>00290         SQLUINTEGER enable_auto_ipd;
<a name="l00291"></a>00291         SQLPOINTER fetch_bookmark_ptr;
<a name="l00292"></a>00292         SQLULEN keyset_size;
<a name="l00293"></a>00293         SQLULEN max_length;
<a name="l00294"></a>00294         SQLULEN max_rows;
<a name="l00295"></a>00295         SQLUINTEGER metadata_id;
<a name="l00296"></a>00296         SQLUINTEGER noscan;
<a name="l00297"></a>00297         <span class="comment">/* apd-&gt;sql_desc_bind_offset_ptr */</span>
<a name="l00298"></a>00298         <span class="comment">/* SQLUINTEGER *param_bind_offset_ptr; */</span>
<a name="l00299"></a>00299         <span class="comment">/* apd-&gt;sql_desc_bind_type */</span>
<a name="l00300"></a>00300         <span class="comment">/* SQLUINTEGER param_bind_type; */</span>
<a name="l00301"></a>00301         <span class="comment">/* apd-&gt;sql_desc_array_status_ptr */</span>
<a name="l00302"></a>00302         <span class="comment">/* SQLUSMALLINT *param_operation_ptr; */</span>
<a name="l00303"></a>00303         <span class="comment">/* ipd-&gt;sql_desc_array_status_ptr */</span>
<a name="l00304"></a>00304         <span class="comment">/* SQLUSMALLINT *param_status_ptr; */</span>
<a name="l00305"></a>00305         <span class="comment">/* ipd-&gt;sql_desc_rows_processed_ptr */</span>
<a name="l00306"></a>00306         <span class="comment">/* SQLUSMALLINT *params_processed_ptr; */</span>
<a name="l00307"></a>00307         <span class="comment">/* apd-&gt;sql_desc_array_size */</span>
<a name="l00308"></a>00308         <span class="comment">/* SQLUINTEGER paramset_size; */</span>
<a name="l00309"></a>00309         SQLUINTEGER query_timeout;
<a name="l00310"></a>00310         SQLUINTEGER retrieve_data;
<a name="l00311"></a>00311         <span class="comment">/* ard-&gt;sql_desc_bind_offset_ptr */</span>
<a name="l00312"></a>00312         <span class="comment">/* SQLUINTEGER *row_bind_offset_ptr; */</span>
<a name="l00313"></a>00313         <span class="comment">/* ard-&gt;sql_desc_array_size */</span>
<a name="l00314"></a>00314         <span class="comment">/* SQLUINTEGER row_array_size; */</span>
<a name="l00315"></a>00315         <span class="comment">/* ard-&gt;sql_desc_bind_type */</span>
<a name="l00316"></a>00316         <span class="comment">/* SQLUINTEGER row_bind_type; */</span>
<a name="l00317"></a>00317         SQLULEN row_number;
<a name="l00318"></a>00318         <span class="comment">/* ard-&gt;sql_desc_array_status_ptr */</span>
<a name="l00319"></a>00319         <span class="comment">/* SQLUINTEGER *row_operation_ptr; */</span>
<a name="l00320"></a>00320         <span class="comment">/* ird-&gt;sql_desc_array_status_ptr */</span>
<a name="l00321"></a>00321         <span class="comment">/* SQLUINTEGER *row_status_ptr; */</span>
<a name="l00322"></a>00322         <span class="comment">/* ird-&gt;sql_desc_rows_processed_ptr */</span>
<a name="l00323"></a>00323         <span class="comment">/* SQLUINTEGER *rows_fetched_ptr; */</span>
<a name="l00324"></a>00324         SQLUINTEGER simulate_cursor;
<a name="l00325"></a>00325         SQLUINTEGER use_bookmarks;
<a name="l00326"></a>00326         <span class="comment">/* SQLGetStmtAttr only */</span>
<a name="l00327"></a>00327 <span class="comment">/*      TDS_DESC *imp_row_desc; */</span>
<a name="l00328"></a>00328 <span class="comment">/*      TDS_DESC *imp_param_desc; */</span>
<a name="l00329"></a>00329 };
<a name="l00330"></a>00330 
<a name="l00331"></a>00331 <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00332"></a>00332 {
<a name="l00333"></a>00333         NOT_IN_ROW,
<a name="l00334"></a>00334         IN_NORMAL_ROW,
<a name="l00335"></a>00335         IN_COMPUTE_ROW,
<a name="l00336"></a>00336         AFTER_COMPUTE_ROW,
<a name="l00337"></a>00337         PRE_NORMAL_ROW
<a name="l00338"></a>00338 } TDS_ODBC_ROW_STATUS;
<a name="l00339"></a>00339 
<a name="l00340"></a>00340 <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00341"></a>00341 {
<a name="l00342"></a>00342         ODBC_SPECIAL_NONE = 0,
<a name="l00343"></a>00343         ODBC_SPECIAL_GETTYPEINFO = 1,
<a name="l00344"></a>00344         ODBC_SPECIAL_COLUMNS = 2,
<a name="l00345"></a>00345         ODBC_SPECIAL_PROCEDURECOLUMNS = 3,
<a name="l00346"></a>00346         ODBC_SPECIAL_SPECIALCOLUMNS = 4
<a name="l00347"></a>00347 } TDS_ODBC_SPECIAL_ROWS;
<a name="l00348"></a>00348 
<a name="l00349"></a><a class="code" href="a00039.html">00349</a> <span class="keyword">struct </span><a class="code" href="a00039.html">_hstmt</a>
<a name="l00350"></a>00350 {
<a name="l00351"></a>00351         SQLSMALLINT htype;      <span class="comment">/* do not reorder this field */</span>
<a name="l00352"></a>00352         <span class="keyword">struct </span><a class="code" href="a00044.html">_sql_errors</a> errs;        <span class="comment">/* do not reorder this field */</span>
<a name="l00353"></a>00353         <span class="keyword">struct </span><a class="code" href="a00034.html">_hdbc</a> *dbc;
<a name="l00355"></a><a class="code" href="a00039.html#afa2e1d84866eb33ef18a19e78c0af7ae">00355</a>         <span class="keywordtype">char</span> *<a class="code" href="a00039.html#afa2e1d84866eb33ef18a19e78c0af7ae" title="query to execute">query</a>;
<a name="l00356"></a>00356 
<a name="l00358"></a><a class="code" href="a00039.html#ad2152f527dcdd108165e7e03fe476b8f">00358</a>         <span class="keyword">struct </span><a class="code" href="a00039.html">_hstmt</a> *<a class="code" href="a00039.html#ad2152f527dcdd108165e7e03fe476b8f" title="next in list">next</a>;
<a name="l00360"></a><a class="code" href="a00039.html#ad36ac281bcfcc5a6b6af0c1428b41d5f">00360</a>         <span class="keyword">struct </span><a class="code" href="a00039.html">_hstmt</a> *<a class="code" href="a00039.html#ad36ac281bcfcc5a6b6af0c1428b41d5f" title="previous in list">prev</a>;
<a name="l00361"></a>00361 
<a name="l00362"></a>00362         <span class="comment">/* begin prepared query stuff */</span>
<a name="l00363"></a>00363         <span class="keywordtype">char</span> *prepared_query;
<a name="l00364"></a>00364         <span class="keywordtype">unsigned</span> prepared_query_is_func:1;
<a name="l00365"></a>00365         <span class="keywordtype">unsigned</span> prepared_query_is_rpc:1;
<a name="l00366"></a>00366         <span class="keywordtype">unsigned</span> need_reprepare:1;
<a name="l00367"></a>00367         <span class="keywordtype">unsigned</span> param_data_called:1;
<a name="l00368"></a>00368         <span class="comment">/* end prepared query stuff */</span>
<a name="l00369"></a>00369 
<a name="l00371"></a><a class="code" href="a00039.html#aebe221315ae3dfd4850c399ad204ca4f">00371</a>         <a class="code" href="a00118.html" title="Hold information for any results.">TDSPARAMINFO</a> *<a class="code" href="a00039.html#aebe221315ae3dfd4850c399ad204ca4f" title="parameters saved">params</a>;
<a name="l00373"></a><a class="code" href="a00039.html#a9b8cb8cb0826323811192adbed126348">00373</a>         <span class="keywordtype">int</span> <a class="code" href="a00039.html#a9b8cb8cb0826323811192adbed126348" title="last valid parameter in params, it&amp;#39;s a ODBC index (from 1 relative to descriptor)...">param_num</a>;
<a name="l00375"></a><a class="code" href="a00039.html#a937cc5e2c56a56cee0d57b8bb3c2f549">00375</a>         <span class="keywordtype">char</span> *<a class="code" href="a00039.html#a937cc5e2c56a56cee0d57b8bb3c2f549" title="position in prepared query to check parameters, used only in RPC">prepared_pos</a>;
<a name="l00376"></a>00376 
<a name="l00377"></a>00377         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> curr_param_row, num_param_rows;
<a name="l00378"></a>00378 
<a name="l00380"></a><a class="code" href="a00039.html#a36e6cb901103834b074bf5a00fe7afbe">00380</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="a00039.html#a36e6cb901103834b074bf5a00fe7afbe" title="number of parameter in current query">param_count</a>;
<a name="l00381"></a>00381         <span class="keywordtype">int</span> row;
<a name="l00383"></a><a class="code" href="a00039.html#a8fd44f3c44ae4c83a1bdda0b73776ecd">00383</a>         TDS_INT8 <a class="code" href="a00039.html#a8fd44f3c44ae4c83a1bdda0b73776ecd" title="row count to return">row_count</a>;
<a name="l00385"></a><a class="code" href="a00039.html#a41dd89b2dc41fe0e747580f6ea807063">00385</a>         TDS_ODBC_ROW_STATUS <a class="code" href="a00039.html#a41dd89b2dc41fe0e747580f6ea807063" title="status of row, it can happen that this flag mark that we are still parsing row, this...">row_status</a>;
<a name="l00386"></a>00386         <span class="comment">/* do NOT free dynamic, free from socket or attach to connection */</span>
<a name="l00387"></a>00387         <a class="code" href="a00101.html" title="Holds information for a dynamic (also called prepared) query.">TDSDYNAMIC</a> *dyn;
<a name="l00388"></a>00388         <a class="code" href="a00035.html">TDS_DESC</a> *ard, *ird, *apd, *ipd;
<a name="l00389"></a>00389         <a class="code" href="a00035.html">TDS_DESC</a> *orig_ard, *orig_apd;
<a name="l00390"></a>00390         SQLULEN sql_rowset_size;
<a name="l00391"></a>00391         <span class="keyword">struct </span><a class="code" href="a00038.html">_hsattr</a> attr;
<a name="l00392"></a>00392         <a class="code" href="a00100.html">DSTR</a> cursor_name;       <span class="comment">/* auto generated cursor name */</span>
<a name="l00393"></a>00393         TDS_ODBC_SPECIAL_ROWS special_row;
<a name="l00394"></a>00394         <span class="comment">/* do NOT free cursor, free from socket or attach to connection */</span>
<a name="l00395"></a>00395         <a class="code" href="a00096.html" title="Holds informations about a cursor.">TDSCURSOR</a> *cursor;
<a name="l00396"></a>00396         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> cancel_sent;
<a name="l00397"></a>00397 };
<a name="l00398"></a>00398 
<a name="l00399"></a>00399 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00037.html">_henv</a> <a class="code" href="a00037.html">TDS_ENV</a>;
<a name="l00400"></a>00400 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00034.html">_hdbc</a> <a class="code" href="a00034.html">TDS_DBC</a>;
<a name="l00401"></a>00401 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00039.html">_hstmt</a> <a class="code" href="a00039.html">TDS_STMT</a>;
<a name="l00402"></a>00402 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00033.html">_hchk</a> <a class="code" href="a00033.html">TDS_CHK</a>;
<a name="l00403"></a>00403 
<a name="l00404"></a>00404 <span class="preprocessor">#define IS_HENV(x) (((TDS_CHK *)x)-&gt;htype == SQL_HANDLE_ENV)</span>
<a name="l00405"></a>00405 <span class="preprocessor"></span><span class="preprocessor">#define IS_HDBC(x) (((TDS_CHK *)x)-&gt;htype == SQL_HANDLE_DBC)</span>
<a name="l00406"></a>00406 <span class="preprocessor"></span><span class="preprocessor">#define IS_HSTMT(x) (((TDS_CHK *)x)-&gt;htype == SQL_HANDLE_STMT)</span>
<a name="l00407"></a>00407 <span class="preprocessor"></span><span class="preprocessor">#define IS_HDESC(x) (((TDS_CHK *)x)-&gt;htype == SQL_HANDLE_DESC)</span>
<a name="l00408"></a>00408 <span class="preprocessor"></span>
<a name="l00409"></a>00409 <span class="comment">/* fix a bug in MingW headers */</span>
<a name="l00410"></a>00410 <span class="preprocessor">#ifdef __MINGW32__</span>
<a name="l00411"></a>00411 <span class="preprocessor"></span><span class="preprocessor">#if SQL_INTERVAL_YEAR == (100 + SQL_CODE_SECOND)</span>
<a name="l00412"></a>00412 <span class="preprocessor"></span>
<a name="l00413"></a>00413 <span class="preprocessor">#undef SQL_INTERVAL_YEAR</span>
<a name="l00414"></a>00414 <span class="preprocessor"></span><span class="preprocessor">#undef SQL_INTERVAL_MONTH</span>
<a name="l00415"></a>00415 <span class="preprocessor"></span><span class="preprocessor">#undef SQL_INTERVAL_DAY</span>
<a name="l00416"></a>00416 <span class="preprocessor"></span><span class="preprocessor">#undef SQL_INTERVAL_HOUR</span>
<a name="l00417"></a>00417 <span class="preprocessor"></span><span class="preprocessor">#undef SQL_INTERVAL_MINUTE</span>
<a name="l00418"></a>00418 <span class="preprocessor"></span><span class="preprocessor">#undef SQL_INTERVAL_SECOND</span>
<a name="l00419"></a>00419 <span class="preprocessor"></span><span class="preprocessor">#undef SQL_INTERVAL_YEAR_TO_MONTH</span>
<a name="l00420"></a>00420 <span class="preprocessor"></span><span class="preprocessor">#undef SQL_INTERVAL_DAY_TO_HOUR</span>
<a name="l00421"></a>00421 <span class="preprocessor"></span><span class="preprocessor">#undef SQL_INTERVAL_DAY_TO_MINUTE</span>
<a name="l00422"></a>00422 <span class="preprocessor"></span><span class="preprocessor">#undef SQL_INTERVAL_DAY_TO_SECOND</span>
<a name="l00423"></a>00423 <span class="preprocessor"></span><span class="preprocessor">#undef SQL_INTERVAL_HOUR_TO_MINUTE</span>
<a name="l00424"></a>00424 <span class="preprocessor"></span><span class="preprocessor">#undef SQL_INTERVAL_HOUR_TO_SECOND</span>
<a name="l00425"></a>00425 <span class="preprocessor"></span><span class="preprocessor">#undef SQL_INTERVAL_MINUTE_TO_SECOND</span>
<a name="l00426"></a>00426 <span class="preprocessor"></span>
<a name="l00427"></a>00427 <span class="preprocessor">#define SQL_INTERVAL_YEAR                                       (100 + SQL_CODE_YEAR)</span>
<a name="l00428"></a>00428 <span class="preprocessor"></span><span class="preprocessor">#define SQL_INTERVAL_MONTH                                      (100 + SQL_CODE_MONTH)</span>
<a name="l00429"></a>00429 <span class="preprocessor"></span><span class="preprocessor">#define SQL_INTERVAL_DAY                                        (100 + SQL_CODE_DAY)</span>
<a name="l00430"></a>00430 <span class="preprocessor"></span><span class="preprocessor">#define SQL_INTERVAL_HOUR                                       (100 + SQL_CODE_HOUR)</span>
<a name="l00431"></a>00431 <span class="preprocessor"></span><span class="preprocessor">#define SQL_INTERVAL_MINUTE                                     (100 + SQL_CODE_MINUTE)</span>
<a name="l00432"></a>00432 <span class="preprocessor"></span><span class="preprocessor">#define SQL_INTERVAL_SECOND                     (100 + SQL_CODE_SECOND)</span>
<a name="l00433"></a>00433 <span class="preprocessor"></span><span class="preprocessor">#define SQL_INTERVAL_YEAR_TO_MONTH                      (100 + SQL_CODE_YEAR_TO_MONTH)</span>
<a name="l00434"></a>00434 <span class="preprocessor"></span><span class="preprocessor">#define SQL_INTERVAL_DAY_TO_HOUR                        (100 + SQL_CODE_DAY_TO_HOUR)</span>
<a name="l00435"></a>00435 <span class="preprocessor"></span><span class="preprocessor">#define SQL_INTERVAL_DAY_TO_MINUTE                      (100 + SQL_CODE_DAY_TO_MINUTE)</span>
<a name="l00436"></a>00436 <span class="preprocessor"></span><span class="preprocessor">#define SQL_INTERVAL_DAY_TO_SECOND                      (100 + SQL_CODE_DAY_TO_SECOND)</span>
<a name="l00437"></a>00437 <span class="preprocessor"></span><span class="preprocessor">#define SQL_INTERVAL_HOUR_TO_MINUTE                     (100 + SQL_CODE_HOUR_TO_MINUTE)</span>
<a name="l00438"></a>00438 <span class="preprocessor"></span><span class="preprocessor">#define SQL_INTERVAL_HOUR_TO_SECOND                     (100 + SQL_CODE_HOUR_TO_SECOND)</span>
<a name="l00439"></a>00439 <span class="preprocessor"></span><span class="preprocessor">#define SQL_INTERVAL_MINUTE_TO_SECOND           (100 + SQL_CODE_MINUTE_TO_SECOND)</span>
<a name="l00440"></a>00440 <span class="preprocessor"></span>
<a name="l00441"></a>00441 <span class="preprocessor">#endif</span>
<a name="l00442"></a>00442 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00443"></a>00443 <span class="preprocessor"></span>
<a name="l00444"></a>00444 <span class="preprocessor">#ifdef _WIN32</span>
<a name="l00445"></a>00445 <span class="preprocessor"></span>BOOL get_login_info(HWND hwndParent, <a class="code" href="a00094.html">TDSCONNECTION</a> * connection);
<a name="l00446"></a>00446 <span class="preprocessor">#endif</span>
<a name="l00447"></a>00447 <span class="preprocessor"></span>
<a name="l00448"></a>00448 <span class="preprocessor">#define ODBC_PARAM_LIST \</span>
<a name="l00449"></a>00449 <span class="preprocessor">        ODBC_PARAM(Servername) \</span>
<a name="l00450"></a>00450 <span class="preprocessor">        ODBC_PARAM(Server) \</span>
<a name="l00451"></a>00451 <span class="preprocessor">        ODBC_PARAM(DSN) \</span>
<a name="l00452"></a>00452 <span class="preprocessor">        ODBC_PARAM(UID) \</span>
<a name="l00453"></a>00453 <span class="preprocessor">        ODBC_PARAM(PWD) \</span>
<a name="l00454"></a>00454 <span class="preprocessor">        ODBC_PARAM(Address) \</span>
<a name="l00455"></a>00455 <span class="preprocessor">        ODBC_PARAM(Port) \</span>
<a name="l00456"></a>00456 <span class="preprocessor">        ODBC_PARAM(TDS_Version) \</span>
<a name="l00457"></a>00457 <span class="preprocessor">        ODBC_PARAM(Language) \</span>
<a name="l00458"></a>00458 <span class="preprocessor">        ODBC_PARAM(Database) \</span>
<a name="l00459"></a>00459 <span class="preprocessor">        ODBC_PARAM(TextSize) \</span>
<a name="l00460"></a>00460 <span class="preprocessor">        ODBC_PARAM(PacketSize) \</span>
<a name="l00461"></a>00461 <span class="preprocessor">        ODBC_PARAM(ClientCharset) \</span>
<a name="l00462"></a>00462 <span class="preprocessor">        ODBC_PARAM(DumpFile) \</span>
<a name="l00463"></a>00463 <span class="preprocessor">        ODBC_PARAM(DumpFileAppend) \</span>
<a name="l00464"></a>00464 <span class="preprocessor">        ODBC_PARAM(DebugFlags) \</span>
<a name="l00465"></a>00465 <span class="preprocessor">        ODBC_PARAM(Encryption) \</span>
<a name="l00466"></a>00466 <span class="preprocessor">        ODBC_PARAM(Trusted_Connection) \</span>
<a name="l00467"></a>00467 <span class="preprocessor">        ODBC_PARAM(APP) \</span>
<a name="l00468"></a>00468 <span class="preprocessor">        ODBC_PARAM(WSID) \</span>
<a name="l00469"></a>00469 <span class="preprocessor">        ODBC_PARAM(UseNTLMv2)</span>
<a name="l00470"></a>00470 <span class="preprocessor"></span>
<a name="l00471"></a>00471 <span class="preprocessor">#define ODBC_PARAM(p) ODBC_PARAM_##p,</span>
<a name="l00472"></a>00472 <span class="preprocessor"></span><span class="keyword">enum</span> {
<a name="l00473"></a>00473         ODBC_PARAM_LIST
<a name="l00474"></a>00474         ODBC_PARAM_SIZE
<a name="l00475"></a>00475 };
<a name="l00476"></a>00476 <span class="preprocessor">#undef ODBC_PARAM</span>
<a name="l00477"></a>00477 <span class="preprocessor"></span>
<a name="l00478"></a>00478 
<a name="l00479"></a>00479 <span class="comment">/*</span>
<a name="l00480"></a>00480 <span class="comment"> * connectparams.h</span>
<a name="l00481"></a>00481 <span class="comment"> */</span>
<a name="l00482"></a>00482 
<a name="l00483"></a><a class="code" href="a00113.html">00483</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00484"></a>00484         <span class="keyword">const</span> <span class="keywordtype">char</span> *p;
<a name="l00485"></a>00485         <span class="keywordtype">size_t</span> len;
<a name="l00486"></a>00486 } <a class="code" href="a00113.html">TDS_PARSED_PARAM</a>;
<a name="l00487"></a>00487 
<a name="l00495"></a>00495 <span class="keywordtype">int</span> odbc_parse_connect_string(<a class="code" href="a00044.html">TDS_ERRS</a> *errs, <span class="keyword">const</span> <span class="keywordtype">char</span> *connect_string, <span class="keyword">const</span> <span class="keywordtype">char</span> *connect_string_end, <a class="code" href="a00094.html">TDSCONNECTION</a> * connection, <a class="code" href="a00113.html">TDS_PARSED_PARAM</a> *parsed_params);
<a name="l00496"></a>00496 <span class="keywordtype">int</span> odbc_get_dsn_info(<a class="code" href="a00044.html">TDS_ERRS</a> *errs, <span class="keyword">const</span> <span class="keywordtype">char</span> *DSN, <a class="code" href="a00094.html">TDSCONNECTION</a> * connection);
<a name="l00497"></a>00497 <span class="preprocessor">#ifdef _WIN32</span>
<a name="l00498"></a>00498 <span class="preprocessor"></span><span class="keywordtype">int</span> odbc_build_connect_string(<a class="code" href="a00044.html">TDS_ERRS</a> *errs, <a class="code" href="a00113.html">TDS_PARSED_PARAM</a> *params, <span class="keywordtype">char</span> **out);
<a name="l00499"></a>00499 <span class="preprocessor">#endif</span>
<a name="l00500"></a>00500 <span class="preprocessor"></span>
<a name="l00501"></a>00501 <span class="comment">/*</span>
<a name="l00502"></a>00502 <span class="comment"> * convert_tds2sql.c</span>
<a name="l00503"></a>00503 <span class="comment"> */</span>
<a name="l00504"></a>00504 SQLLEN odbc_tds2sql(<a class="code" href="a00039.html">TDS_STMT</a> * stmt, <a class="code" href="a00092.html" title="Metadata about columns in regular and compute rows.">TDSCOLUMN</a> *curcol, <span class="keywordtype">int</span> srctype, TDS_CHAR * src, TDS_UINT srclen, <span class="keywordtype">int</span> desttype, TDS_CHAR * dest, SQLULEN destlen, <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="a00031.html">_drecord</a> *drec_ixd);
<a name="l00505"></a>00505 
<a name="l00506"></a>00506 <span class="comment">/*</span>
<a name="l00507"></a>00507 <span class="comment"> * descriptor.c</span>
<a name="l00508"></a>00508 <span class="comment"> */</span>
<a name="l00509"></a>00509 <a class="code" href="a00035.html">TDS_DESC</a> *desc_alloc(SQLHANDLE parent, <span class="keywordtype">int</span> desc_type, <span class="keywordtype">int</span> alloc_type);
<a name="l00510"></a>00510 SQLRETURN desc_free(<a class="code" href="a00035.html">TDS_DESC</a> * desc);
<a name="l00511"></a>00511 SQLRETURN desc_alloc_records(<a class="code" href="a00035.html">TDS_DESC</a> * desc, <span class="keywordtype">unsigned</span> count);
<a name="l00512"></a>00512 SQLRETURN desc_copy(<a class="code" href="a00035.html">TDS_DESC</a> * dest, <a class="code" href="a00035.html">TDS_DESC</a> * src);
<a name="l00513"></a>00513 SQLRETURN desc_free_records(<a class="code" href="a00035.html">TDS_DESC</a> * desc);
<a name="l00514"></a>00514 <a class="code" href="a00034.html">TDS_DBC</a> *desc_get_dbc(<a class="code" href="a00035.html">TDS_DESC</a> *desc);
<a name="l00515"></a>00515 
<a name="l00516"></a>00516 <span class="comment">/*</span>
<a name="l00517"></a>00517 <span class="comment"> * odbc.c</span>
<a name="l00518"></a>00518 <span class="comment"> */</span>
<a name="l00519"></a>00519 SQLRETURN _SQLRowCount(SQLHSTMT hstmt, SQLLEN FAR * pcrow);
<a name="l00520"></a>00520 
<a name="l00521"></a>00521 <span class="comment">/*</span>
<a name="l00522"></a>00522 <span class="comment"> * odbc_checks.h</span>
<a name="l00523"></a>00523 <span class="comment"> */</span>
<a name="l00524"></a>00524 <span class="preprocessor">#if ENABLE_EXTRA_CHECKS</span>
<a name="l00525"></a>00525 <span class="preprocessor"></span><span class="comment">/* macro */</span>
<a name="l00526"></a>00526 <span class="preprocessor">#define CHECK_ENV_EXTRA(env) odbc_check_env_extra(env)</span>
<a name="l00527"></a>00527 <span class="preprocessor"></span><span class="preprocessor">#define CHECK_DBC_EXTRA(dbc) odbc_check_dbc_extra(dbc)</span>
<a name="l00528"></a>00528 <span class="preprocessor"></span><span class="preprocessor">#define CHECK_STMT_EXTRA(stmt) odbc_check_stmt_extra(stmt)</span>
<a name="l00529"></a>00529 <span class="preprocessor"></span><span class="preprocessor">#define CHECK_DESC_EXTRA(desc) odbc_check_desc_extra(desc)</span>
<a name="l00530"></a>00530 <span class="preprocessor"></span><span class="comment">/* declarations*/</span>
<a name="l00531"></a>00531 <span class="keywordtype">void</span> odbc_check_env_extra(<a class="code" href="a00037.html">TDS_ENV</a> * env);
<a name="l00532"></a>00532 <span class="keywordtype">void</span> odbc_check_dbc_extra(<a class="code" href="a00034.html">TDS_DBC</a> * dbc);
<a name="l00533"></a>00533 <span class="keywordtype">void</span> odbc_check_stmt_extra(<a class="code" href="a00039.html">TDS_STMT</a> * stmt);
<a name="l00534"></a>00534 <span class="keywordtype">void</span> odbc_check_desc_extra(<a class="code" href="a00035.html">TDS_DESC</a> * desc);
<a name="l00535"></a>00535 <span class="preprocessor">#else</span>
<a name="l00536"></a>00536 <span class="preprocessor"></span><span class="comment">/* macro */</span>
<a name="l00537"></a>00537 <span class="preprocessor">#define CHECK_ENV_EXTRA(env)</span>
<a name="l00538"></a>00538 <span class="preprocessor"></span><span class="preprocessor">#define CHECK_DBC_EXTRA(dbc)</span>
<a name="l00539"></a>00539 <span class="preprocessor"></span><span class="preprocessor">#define CHECK_STMT_EXTRA(stmt)</span>
<a name="l00540"></a>00540 <span class="preprocessor"></span><span class="preprocessor">#define CHECK_DESC_EXTRA(desc)</span>
<a name="l00541"></a>00541 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00542"></a>00542 <span class="preprocessor"></span>
<a name="l00543"></a>00543 <span class="comment">/*</span>
<a name="l00544"></a>00544 <span class="comment"> * odbc_util.h</span>
<a name="l00545"></a>00545 <span class="comment"> */</span>
<a name="l00546"></a>00546 
<a name="l00547"></a>00547 <span class="comment">/* helpers for ODBC wide string support */</span>
<a name="l00548"></a>00548 <span class="preprocessor">#undef _wide</span>
<a name="l00549"></a>00549 <span class="preprocessor"></span><span class="preprocessor">#undef _WIDE</span>
<a name="l00550"></a>00550 <span class="preprocessor"></span><span class="preprocessor">#ifdef ENABLE_ODBC_WIDE</span>
<a name="l00551"></a>00551 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keyword">union </span>{
<a name="l00552"></a>00552         <span class="keywordtype">char</span> mb[1];
<a name="l00553"></a>00553         SQLWCHAR wide[1];
<a name="l00554"></a>00554 } ODBC_CHAR;
<a name="l00555"></a>00555 <span class="preprocessor"># define _wide ,wide</span>
<a name="l00556"></a>00556 <span class="preprocessor"></span><span class="preprocessor"># define _wide0 ,0</span>
<a name="l00557"></a>00557 <span class="preprocessor"></span><span class="preprocessor"># define _WIDE ,int wide</span>
<a name="l00558"></a>00558 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00559"></a>00559 <span class="preprocessor"></span><span class="preprocessor"># define _wide</span>
<a name="l00560"></a>00560 <span class="preprocessor"></span><span class="preprocessor"># define _wide0</span>
<a name="l00561"></a>00561 <span class="preprocessor"></span><span class="preprocessor"># define _WIDE</span>
<a name="l00562"></a>00562 <span class="preprocessor"></span><span class="preprocessor"># define ODBC_CHAR SQLCHAR</span>
<a name="l00563"></a>00563 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00564"></a>00564 <span class="preprocessor"></span><span class="keywordtype">int</span> odbc_set_stmt_query(<span class="keyword">struct</span> <a class="code" href="a00039.html">_hstmt</a> *stmt, <span class="keyword">const</span> ODBC_CHAR *sql, <span class="keywordtype">int</span> sql_len _WIDE);
<a name="l00565"></a>00565 <span class="keywordtype">int</span> odbc_set_stmt_prepared_query(<span class="keyword">struct</span> <a class="code" href="a00039.html">_hstmt</a> *stmt, <span class="keyword">const</span> ODBC_CHAR *sql, <span class="keywordtype">int</span> sql_len _WIDE);
<a name="l00566"></a>00566 <span class="keywordtype">void</span> odbc_set_return_status(<span class="keyword">struct</span> <a class="code" href="a00039.html">_hstmt</a> *stmt, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n_row);
<a name="l00567"></a>00567 <span class="keywordtype">void</span> odbc_set_return_params(<span class="keyword">struct</span> <a class="code" href="a00039.html">_hstmt</a> *stmt, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n_row);
<a name="l00568"></a>00568 
<a name="l00569"></a>00569 SQLSMALLINT <a class="code" href="a00295.html#ga48b785425697ed26acef484aec874c44" title="Convert type from database to ODBC.">odbc_server_to_sql_type</a>(<span class="keywordtype">int</span> col_type, <span class="keywordtype">int</span> col_size);
<a name="l00570"></a>00570 <span class="keywordtype">int</span> odbc_sql_to_c_type_default(<span class="keywordtype">int</span> sql_type);
<a name="l00571"></a>00571 <span class="keywordtype">int</span> odbc_sql_to_server_type(<a class="code" href="a00122.html" title="Information for a server connection.">TDSSOCKET</a> * tds, <span class="keywordtype">int</span> sql_type);
<a name="l00572"></a>00572 <span class="keywordtype">int</span> <a class="code" href="a00295.html#gafc3593e71189aa4f32a6f6f42dc7cfd7" title="Pass this an SQL_C_* type and get a SYB* type which most closely corresponds to the...">odbc_c_to_server_type</a>(<span class="keywordtype">int</span> c_type);
<a name="l00573"></a>00573 
<a name="l00574"></a>00574 <span class="keywordtype">void</span> odbc_set_sql_type_info(<a class="code" href="a00092.html" title="Metadata about columns in regular and compute rows.">TDSCOLUMN</a> * col, <span class="keyword">struct</span> <a class="code" href="a00031.html">_drecord</a> *drec, SQLINTEGER odbc_ver);
<a name="l00575"></a>00575 SQLINTEGER odbc_sql_to_displaysize(<span class="keywordtype">int</span> sqltype, <a class="code" href="a00092.html" title="Metadata about columns in regular and compute rows.">TDSCOLUMN</a> *col);
<a name="l00576"></a>00576 <span class="keywordtype">int</span> odbc_get_string_size(<span class="keywordtype">int</span> size, ODBC_CHAR * str _WIDE);
<a name="l00577"></a>00577 <span class="keywordtype">void</span> <a class="code" href="a00295.html#gae85ff7fb2002b5a7abc04fbee79e5525" title="Returns the version of the RDBMS in the ODBC format.">odbc_rdbms_version</a>(<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="l00578"></a>00578 SQLINTEGER <a class="code" href="a00295.html#ga35028e8de1d50dc51ccef1d645c55e2a" title="Return length of parameter from parameter information.">odbc_get_param_len</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="a00031.html">_drecord</a> *drec_axd, <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="a00031.html">_drecord</a> *drec_ixd, <span class="keyword">const</span> <a class="code" href="a00035.html">TDS_DESC</a>* axd, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n_row);
<a name="l00579"></a>00579 
<a name="l00580"></a>00580 <span class="preprocessor">#ifdef ENABLE_ODBC_WIDE</span>
<a name="l00581"></a>00581 <span class="preprocessor"></span><a class="code" href="a00100.html">DSTR</a>* odbc_dstr_copy_flag(<a class="code" href="a00034.html">TDS_DBC</a> *dbc, <a class="code" href="a00100.html">DSTR</a> *s, <span class="keywordtype">int</span> size, ODBC_CHAR * str, <span class="keywordtype">int</span> flag);
<a name="l00582"></a>00582 <span class="preprocessor">#define odbc_dstr_copy(dbc, s, len, out) \</span>
<a name="l00583"></a>00583 <span class="preprocessor">        odbc_dstr_copy_flag(dbc, s, len, sizeof((out)-&gt;mb) ? (out) : (out), wide)</span>
<a name="l00584"></a>00584 <span class="preprocessor"></span><span class="preprocessor">#define odbc_dstr_copy_oct(dbc, s, len, out) \</span>
<a name="l00585"></a>00585 <span class="preprocessor">        odbc_dstr_copy_flag(dbc, s, len, out, wide|0x20)</span>
<a name="l00586"></a>00586 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00587"></a>00587 <span class="preprocessor"></span><a class="code" href="a00100.html">DSTR</a>* odbc_dstr_copy(<a class="code" href="a00034.html">TDS_DBC</a> *dbc, <a class="code" href="a00100.html">DSTR</a> *s, <span class="keywordtype">int</span> size, ODBC_CHAR * str);
<a name="l00588"></a>00588 <span class="preprocessor">#define odbc_dstr_copy_oct odbc_dstr_copy</span>
<a name="l00589"></a>00589 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00590"></a>00590 <span class="preprocessor"></span>
<a name="l00591"></a>00591 
<a name="l00592"></a>00592 SQLRETURN <a class="code" href="a00295.html#gadba4490bf3183799a70c9e2f44fab331" title="Copy a string to client setting size according to ODBC convenction.">odbc_set_string_flag</a>(<a class="code" href="a00034.html">TDS_DBC</a> *dbc, SQLPOINTER buffer, SQLINTEGER cbBuffer, <span class="keywordtype">void</span> FAR * pcbBuffer, <span class="keyword">const</span> <span class="keywordtype">char</span> *s, <span class="keywordtype">int</span> len, <span class="keywordtype">int</span> flag);
<a name="l00593"></a>00593 <span class="preprocessor">#ifdef ENABLE_ODBC_WIDE</span>
<a name="l00594"></a>00594 <span class="preprocessor"></span><span class="preprocessor">#define odbc_set_string(dbc, buf, buf_len, out_len, s, s_len) \</span>
<a name="l00595"></a>00595 <span class="preprocessor">        odbc_set_string_flag(dbc, sizeof((buf)-&gt;mb) ? (buf) : (buf), buf_len, out_len, s, s_len, (wide) | (sizeof(*(out_len)) == sizeof(SQLSMALLINT)?0:0x10))</span>
<a name="l00596"></a>00596 <span class="preprocessor"></span><span class="preprocessor">#define odbc_set_string_oct(dbc, buf, buf_len, out_len, s, s_len) \</span>
<a name="l00597"></a>00597 <span class="preprocessor">        odbc_set_string_flag(dbc, buf, buf_len, out_len, s, s_len, (wide) | (sizeof(*(out_len)) == sizeof(SQLSMALLINT)?0x20:0x30))</span>
<a name="l00598"></a>00598 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00599"></a>00599 <span class="preprocessor"></span><span class="preprocessor">#define odbc_set_string(dbc, buf, buf_len, out_len, s, s_len) \</span>
<a name="l00600"></a>00600 <span class="preprocessor">        odbc_set_string_flag(dbc, buf, buf_len, out_len, s, s_len, (sizeof(*(out_len)) == sizeof(SQLSMALLINT)?0:0x10))</span>
<a name="l00601"></a>00601 <span class="preprocessor"></span><span class="preprocessor">#define odbc_set_string_oct(dbc, buf, buf_len, out_len, s, s_len) \</span>
<a name="l00602"></a>00602 <span class="preprocessor">        odbc_set_string_flag(dbc, buf, buf_len, out_len, s, s_len, (sizeof(*(out_len)) == sizeof(SQLSMALLINT)?0x20:0x30))</span>
<a name="l00603"></a>00603 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00604"></a>00604 <span class="preprocessor"></span>
<a name="l00605"></a>00605 SQLSMALLINT odbc_get_concise_sql_type(SQLSMALLINT type, SQLSMALLINT interval);
<a name="l00606"></a>00606 SQLRETURN <a class="code" href="a00295.html#ga125574bd2de677438909612db80041ea" title="Set concise type and all cascading field.">odbc_set_concise_sql_type</a>(SQLSMALLINT concise_type, <span class="keyword">struct</span> <a class="code" href="a00031.html">_drecord</a> *drec, <span class="keywordtype">int</span> check_only);
<a name="l00607"></a>00607 SQLSMALLINT odbc_get_concise_c_type(SQLSMALLINT type, SQLSMALLINT interval);
<a name="l00608"></a>00608 SQLRETURN <a class="code" href="a00295.html#ga128f6b09cde0af252370ba89cfa1fb78" title="Set concise type and all cascading field.">odbc_set_concise_c_type</a>(SQLSMALLINT concise_type, <span class="keyword">struct</span> <a class="code" href="a00031.html">_drecord</a> *drec, <span class="keywordtype">int</span> check_only);
<a name="l00609"></a>00609 
<a name="l00610"></a>00610 SQLLEN odbc_get_octet_len(<span class="keywordtype">int</span> c_type, <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="a00031.html">_drecord</a> *drec);
<a name="l00611"></a>00611 <span class="keywordtype">void</span> odbc_convert_err_set(<span class="keyword">struct</span> <a class="code" href="a00044.html">_sql_errors</a> *errs, TDS_INT err);
<a name="l00612"></a>00612 
<a name="l00613"></a>00613 <span class="comment">/*</span>
<a name="l00614"></a>00614 <span class="comment"> * prepare_query.c</span>
<a name="l00615"></a>00615 <span class="comment"> */</span>
<a name="l00616"></a>00616 SQLRETURN prepare_call(<span class="keyword">struct</span> <a class="code" href="a00039.html">_hstmt</a> *stmt);
<a name="l00617"></a>00617 SQLRETURN native_sql(<span class="keyword">struct</span> <a class="code" href="a00034.html">_hdbc</a> *dbc, <span class="keywordtype">char</span> *s);
<a name="l00618"></a>00618 <span class="keywordtype">int</span> parse_prepared_query(<span class="keyword">struct</span> <a class="code" href="a00039.html">_hstmt</a> *stmt, <span class="keywordtype">int</span> compute_row);
<a name="l00619"></a>00619 <span class="keywordtype">int</span> start_parse_prepared_query(<span class="keyword">struct</span> <a class="code" href="a00039.html">_hstmt</a> *stmt, <span class="keywordtype">int</span> compute_row);
<a name="l00620"></a>00620 <span class="keywordtype">int</span> continue_parse_prepared_query(<span class="keyword">struct</span> <a class="code" href="a00039.html">_hstmt</a> *stmt, SQLPOINTER DataPtr, SQLLEN StrLen_or_Ind);
<a name="l00621"></a>00621 <span class="keyword">const</span> <span class="keywordtype">char</span> *parse_const_param(<span class="keyword">const</span> <span class="keywordtype">char</span> * s, TDS_SERVER_TYPE *type);
<a name="l00622"></a>00622 
<a name="l00623"></a>00623 <span class="comment">/*</span>
<a name="l00624"></a>00624 <span class="comment"> * sql2tds.c</span>
<a name="l00625"></a>00625 <span class="comment"> */</span>
<a name="l00626"></a>00626 SQLRETURN odbc_sql2tds(<a class="code" href="a00039.html">TDS_STMT</a> * stmt, <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="a00031.html">_drecord</a> *drec_ixd, <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="a00031.html">_drecord</a> *drec_axd, <a class="code" href="a00092.html" title="Metadata about columns in regular and compute rows.">TDSCOLUMN</a> *curcol, <span class="keywordtype">int</span> compute_row, <span class="keyword">const</span> <a class="code" href="a00035.html">TDS_DESC</a>* axd, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n_row);
<a name="l00627"></a>00627 
<a name="l00628"></a>00628 <span class="comment">/*</span>
<a name="l00629"></a>00629 <span class="comment"> * sqlwchar.c</span>
<a name="l00630"></a>00630 <span class="comment"> */</span>
<a name="l00631"></a>00631 <span class="preprocessor">#if SIZEOF_SQLWCHAR != SIZEOF_WCHAR_T</span>
<a name="l00632"></a>00632 <span class="preprocessor"></span><span class="keywordtype">size_t</span> sqlwcslen(<span class="keyword">const</span> SQLWCHAR * s);
<a name="l00633"></a>00633 <span class="preprocessor">#else</span>
<a name="l00634"></a>00634 <span class="preprocessor"></span><span class="preprocessor">#define sqlwcslen wcslen</span>
<a name="l00635"></a>00635 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00636"></a>00636 <span class="preprocessor"></span>
<a name="l00637"></a>00637 <span class="preprocessor">#if SIZEOF_SQLWCHAR == 2</span>
<a name="l00638"></a>00638 <span class="preprocessor"></span><span class="preprocessor"># if WORDS_BIGENDIAN</span>
<a name="l00639"></a>00639 <span class="preprocessor"></span><span class="preprocessor">#  define ODBC_WIDE_NAME &quot;UCS-2BE&quot;</span>
<a name="l00640"></a>00640 <span class="preprocessor"></span><span class="preprocessor"># else</span>
<a name="l00641"></a>00641 <span class="preprocessor"></span><span class="preprocessor">#  define ODBC_WIDE_NAME &quot;UCS-2LE&quot;</span>
<a name="l00642"></a>00642 <span class="preprocessor"></span><span class="preprocessor"># endif</span>
<a name="l00643"></a>00643 <span class="preprocessor"></span><span class="preprocessor">#elif SIZEOF_SQLWCHAR == 4</span>
<a name="l00644"></a>00644 <span class="preprocessor"></span><span class="preprocessor"># if WORDS_BIGENDIAN</span>
<a name="l00645"></a>00645 <span class="preprocessor"></span><span class="preprocessor">#  define ODBC_WIDE_NAME &quot;UCS-4BE&quot;</span>
<a name="l00646"></a>00646 <span class="preprocessor"></span><span class="preprocessor"># else</span>
<a name="l00647"></a>00647 <span class="preprocessor"></span><span class="preprocessor">#  define ODBC_WIDE_NAME &quot;UCS-4LE&quot;</span>
<a name="l00648"></a>00648 <span class="preprocessor"></span><span class="preprocessor"># endif</span>
<a name="l00649"></a>00649 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00650"></a>00650 <span class="preprocessor"></span><span class="preprocessor">#error SIZEOF_SQLWCHAR not supported !!</span>
<a name="l00651"></a>00651 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00652"></a>00652 <span class="preprocessor"></span>
<a name="l00653"></a>00653 <span class="preprocessor">#if defined(__GNUC__) &amp;&amp; __GNUC__ &gt;= 4 &amp;&amp; !defined(__MINGW32__)</span>
<a name="l00654"></a>00654 <span class="preprocessor"></span><span class="preprocessor">#pragma GCC visibility pop</span>
<a name="l00655"></a>00655 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00656"></a>00656 <span class="preprocessor"></span>
<a name="l00657"></a>00657 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00658"></a>00658 <span class="preprocessor"></span><span class="preprocessor">#if 0</span>
<a name="l00659"></a>00659 <span class="preprocessor"></span>{
<a name="l00660"></a>00660 <span class="preprocessor">#endif</span>
<a name="l00661"></a>00661 <span class="preprocessor"></span>}
<a name="l00662"></a>00662 <span class="preprocessor">#endif</span>
<a name="l00663"></a>00663 <span class="preprocessor"></span>
<a name="l00664"></a>00664 <span class="preprocessor">#endif</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>