Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-release > by-pkgid > f0bc842dcf666302badcfd2545f3387c > files > 91

libfreetds0-doc-0.82-12.mga1.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>FreeTDS API: /usr/local/users/home/jklowden/projects/releases/freetds/0.82/include/tdsconvert.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<div class="nav">
<a class="el" href="dir_000000.html">include</a></div>
<h1>tdsconvert.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/* FreeTDS - Library of routines accessing Sybase and Microsoft databases</span>
00002 <span class="comment"> * Copyright (C) 1998-1999  Brian Bruns</span>
00003 <span class="comment"> *</span>
00004 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
00005 <span class="comment"> * modify it under the terms of the GNU Library General Public</span>
00006 <span class="comment"> * License as published by the Free Software Foundation; either</span>
00007 <span class="comment"> * version 2 of the License, or (at your option) any later version.</span>
00008 <span class="comment"> *</span>
00009 <span class="comment"> * This library is distributed in the hope that it will be useful,</span>
00010 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
00011 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
00012 <span class="comment"> * Library General Public License for more details.</span>
00013 <span class="comment"> *</span>
00014 <span class="comment"> * You should have received a copy of the GNU Library General Public</span>
00015 <span class="comment"> * License along with this library; if not, write to the</span>
00016 <span class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330,</span>
00017 <span class="comment"> * Boston, MA 02111-1307, USA.</span>
00018 <span class="comment"> */</span>
00019 
00020 <span class="preprocessor">#ifndef _tdsconvert_h_</span>
00021 <span class="preprocessor"></span><span class="preprocessor">#define _tdsconvert_h_</span>
00022 <span class="preprocessor"></span>
00023 <span class="preprocessor">#ifdef __cplusplus</span>
00024 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span>
00025 {
00026 <span class="preprocessor">#if 0</span>
00027 <span class="preprocessor"></span>}
00028 <span class="preprocessor">#endif</span>
00029 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00030 <span class="preprocessor"></span>
00031 <span class="comment">/* $Id: tdsconvert.h,v 1.23 2006/04/15 08:18:44 freddy77 Exp $ */</span>
00032 
00033 <span class="keyword">typedef</span> <span class="keyword">union </span>conv_result
00034 {
00035         TDS_TINYINT ti;
00036         TDS_SMALLINT si;
00037         TDS_INT i;
00038         TDS_INT8 bi;
00039         TDS_FLOAT f;
00040         TDS_REAL r;
00041         TDS_CHAR *c;
00042         TDS_MONEY m;
00043         TDS_MONEY4 m4;
00044         TDS_DATETIME dt;
00045         TDS_DATETIME4 dt4;
00046         TDS_NUMERIC n;
00047         TDS_CHAR *ib;
00048         TDS_UNIQUE u;
00049         <span class="comment">/* sizef types */</span>
00050         <span class="keyword">struct </span>cc_t {
00051                 TDS_CHAR *c;
00052                 TDS_UINT len;
00053         } cc;
00054         <span class="keyword">struct </span>cb_t {
00055                 TDS_CHAR *ib;
00056                 TDS_UINT len;
00057         } cb;
00058 }
00059 CONV_RESULT;
00060 
00061 <span class="comment">/*</span>
00062 <span class="comment"> * Failure return codes for tds_convert()</span>
00063 <span class="comment"> */</span>
00064 <span class="preprocessor">#define TDS_CONVERT_FAIL        -1      </span><span class="comment">/* unspecified failure */</span>
00065 <span class="preprocessor">#define TDS_CONVERT_NOAVAIL     -2      </span><span class="comment">/* conversion does not exist */</span>
00066 <span class="preprocessor">#define TDS_CONVERT_SYNTAX      -3      </span><span class="comment">/* syntax error in source field */</span>
00067 <span class="preprocessor">#define TDS_CONVERT_NOMEM       -4      </span><span class="comment">/* insufficient memory */</span>
00068 <span class="preprocessor">#define TDS_CONVERT_OVERFLOW    -5      </span><span class="comment">/* result too large */</span>
00069 
00070 <span class="comment">/* sized types */</span>
00071 <span class="preprocessor">#define TDS_CONVERT_CHAR        256</span>
00072 <span class="preprocessor"></span><span class="preprocessor">#define TDS_CONVERT_BINARY      257</span>
00073 <span class="preprocessor"></span>
00074 <span class="keyword">struct </span>tds_time
00075 {
00076         <span class="keywordtype">int</span> tm_year; 
00077         <span class="keywordtype">int</span> tm_mon;  
00078         <span class="keywordtype">int</span> tm_mday; 
00079         <span class="keywordtype">int</span> tm_hour; 
00080         <span class="keywordtype">int</span> tm_min;  
00081         <span class="keywordtype">int</span> tm_sec;  
00082         <span class="keywordtype">int</span> tm_ms;   
00083 };
00084 
00085 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00287.html#ga41">tds_willconvert</a>(<span class="keywordtype">int</span> srctype, <span class="keywordtype">int</span> desttype);
00086 
00087 TDS_INT <a class="code" href="a00287.html#ga39">tds_get_null_type</a>(<span class="keywordtype">int</span> srctype);
00088 TDS_INT <a class="code" href="a00287.html#ga35">tds_convert</a>(<span class="keyword">const</span> TDSCONTEXT * context, <span class="keywordtype">int</span> srctype, <span class="keyword">const</span> TDS_CHAR * src, TDS_UINT srclen, <span class="keywordtype">int</span> desttype, CONV_RESULT * cr);
00089 
00090 size_t <a class="code" href="a00287.html#ga40">tds_strftime</a>(<span class="keywordtype">char</span> *buf, size_t maxsize, <span class="keyword">const</span> <span class="keywordtype">char</span> *format, <span class="keyword">const</span> <a class="code" href="a00145.html">TDSDATEREC</a> * timeptr);
00091 
00092 <span class="preprocessor">#ifdef __cplusplus</span>
00093 <span class="preprocessor"></span><span class="preprocessor">#if 0</span>
00094 <span class="preprocessor"></span>{
00095 <span class="preprocessor">#endif</span>
00096 <span class="preprocessor"></span>}
00097 <span class="preprocessor">#endif</span>
00098 <span class="preprocessor"></span>
00099 <span class="preprocessor">#endif </span><span class="comment">/* _tdsconvert_h_ */</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed May 7 19:22:09 2008 for FreeTDS API by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.1 </small></address>
</body>
</html>