xref: /aoo42x/main/unixODBC/inc/sqlucode.h (revision 24201887)
1 /*
2  *  sqlucode.h
3  *
4  *  $Id: sqlucode.h,v 1.5 2006/01/24 11:28:34 source Exp $
5  *
6  *  ODBC Unicode defines
7  *
8  *  The iODBC driver manager.
9  *
10  *  Copyright (C) 1996-2006 by OpenLink Software <iodbc@openlinksw.com>
11  *  All Rights Reserved.
12  *
13  *  This software is released under the terms of either of the following
14  *  licenses:
15  *
16  *      - GNU Library General Public License (see LICENSE.LGPL)
17  *      - The BSD License (see LICENSE.BSD).
18  *
19  *  Note that the only valid version of the LGPL license as far as this
20  *  project is concerned is the original GNU Library General Public License
21  *  Version 2, dated June 1991.
22  *
23  *  While not mandated by the BSD license, any patches you make to the
24  *  iODBC source code may be contributed back into the iODBC project
25  *  at your discretion. Contributions will benefit the Open Source and
26  *  Data Access community as a whole. Submissions may be made at:
27  *
28  *      http://www.iodbc.org
29  *
30  *
31  *  GNU Library Generic Public License Version 2
32  *  ============================================
33  *  This library is free software; you can redistribute it and/or
34  *  modify it under the terms of the GNU Library General Public
35  *  License as published by the Free Software Foundation; only
36  *  Version 2 of the License dated June 1991.
37  *
38  *  This library is distributed in the hope that it will be useful,
39  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
40  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
41  *  Library General Public License for more details.
42  *
43  *  You should have received a copy of the GNU Library General Public
44  *  License along with this library; if not, write to the Free
45  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
46  *
47  *
48  *  The BSD License
49  *  ===============
50  *  Redistribution and use in source and binary forms, with or without
51  *  modification, are permitted provided that the following conditions
52  *  are met:
53  *
54  *  1. Redistributions of source code must retain the above copyright
55  *     notice, this list of conditions and the following disclaimer.
56  *  2. Redistributions in binary form must reproduce the above copyright
57  *     notice, this list of conditions and the following disclaimer in
58  *     the documentation and/or other materials provided with the
59  *     distribution.
60  *  3. Neither the name of OpenLink Software Inc. nor the names of its
61  *     contributors may be used to endorse or promote products derived
62  *     from this software without specific prior written permission.
63  *
64  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
65  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
66  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
67  *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR
68  *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
69  *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
70  *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
71  *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
72  *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
73  *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
74  *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
75  */
76 
77 #ifndef _SQLUCODE_H
78 #define _SQLUCODE_H
79 
80 #ifndef _SQLEXT_H
81 #include <sqlext.h>
82 #endif
83 
84 #ifdef __cplusplus
85 extern "C" {
86 #endif
87 
88 
89 /*
90  *  SQL datatypes - Unicode
91  */
92 #define SQL_WCHAR				(-8)
93 #define SQL_WVARCHAR				(-9)
94 #define SQL_WLONGVARCHAR			(-10)
95 #define SQL_C_WCHAR				SQL_WCHAR
96 
97 #ifdef UNICODE
98 #define SQL_C_TCHAR				SQL_C_WCHAR
99 #else
100 #define SQL_C_TCHAR				SQL_C_CHAR
101 #endif
102 
103 
104 /* SQLTablesW */
105 #if (ODBCVER >= 0x0300)
106 #define SQL_ALL_CATALOGSW			L"%"
107 #define SQL_ALL_SCHEMASW			L"%"
108 #define SQL_ALL_TABLE_TYPESW			L"%"
109 #endif /* ODBCVER >= 0x0300 */
110 
111 
112 /*
113  *  Size of SQLSTATE - Unicode
114  */
115 #define SQL_SQLSTATE_SIZEW			10
116 
117 
118 /*
119  *  Function Prototypes - Unicode
120  */
121 SQLRETURN SQL_API SQLColAttributeW (
122     SQLHSTMT		  hstmt,
123     SQLUSMALLINT	  iCol,
124     SQLUSMALLINT	  iField,
125     SQLPOINTER		  pCharAttr,
126     SQLSMALLINT		  cbCharAttrMax,
127     SQLSMALLINT		* pcbCharAttr,
128     SQLLEN		* pNumAttr);
129 
130 SQLRETURN SQL_API SQLColAttributesW (
131     SQLHSTMT		  hstmt,
132     SQLUSMALLINT	  icol,
133     SQLUSMALLINT	  fDescType,
134     SQLPOINTER		  rgbDesc,
135     SQLSMALLINT		  cbDescMax,
136     SQLSMALLINT		* pcbDesc,
137     SQLLEN		* pfDesc);
138 
139 SQLRETURN SQL_API SQLConnectW (
140     SQLHDBC		  hdbc,
141     SQLWCHAR		* szDSN,
142     SQLSMALLINT		  cbDSN,
143     SQLWCHAR		* szUID,
144     SQLSMALLINT		  cbUID,
145     SQLWCHAR		* szAuthStr,
146     SQLSMALLINT		  cbAuthStr);
147 
148 SQLRETURN SQL_API SQLDescribeColW (
149     SQLHSTMT		  hstmt,
150     SQLUSMALLINT	  icol,
151     SQLWCHAR		* szColName,
152     SQLSMALLINT		  cbColNameMax,
153     SQLSMALLINT		* pcbColName,
154     SQLSMALLINT		* pfSqlType,
155     SQLULEN		* pcbColDef,
156     SQLSMALLINT		* pibScale,
157     SQLSMALLINT		* pfNullable);
158 
159 SQLRETURN SQL_API SQLErrorW (
160     SQLHENV		  henv,
161     SQLHDBC		  hdbc,
162     SQLHSTMT		  hstmt,
163     SQLWCHAR		* szSqlState,
164     SQLINTEGER		* pfNativeError,
165     SQLWCHAR		* szErrorMsg,
166     SQLSMALLINT		  cbErrorMsgMax,
167     SQLSMALLINT		* pcbErrorMsg);
168 
169 SQLRETURN SQL_API SQLExecDirectW (
170     SQLHSTMT		  hstmt,
171     SQLWCHAR		* szSqlStr,
172     SQLINTEGER		  cbSqlStr);
173 
174 SQLRETURN SQL_API SQLGetConnectAttrW (
175     SQLHDBC		  hdbc,
176     SQLINTEGER		  fAttribute,
177     SQLPOINTER		  rgbValue,
178     SQLINTEGER		  cbValueMax,
179     SQLINTEGER		* pcbValue);
180 
181 SQLRETURN SQL_API SQLGetCursorNameW (
182     SQLHSTMT		  hstmt,
183     SQLWCHAR		* szCursor,
184     SQLSMALLINT		  cbCursorMax,
185     SQLSMALLINT		* pcbCursor);
186 
187 #if (ODBCVER >= 0x0300)
188 SQLRETURN SQL_API SQLSetDescFieldW (
189     SQLHDESC		  DescriptorHandle,
190     SQLSMALLINT		  RecNumber,
191     SQLSMALLINT		  FieldIdentifier,
192     SQLPOINTER		  Value,
193     SQLINTEGER		  BufferLength);
194 
195 SQLRETURN SQL_API SQLGetDescFieldW (
196     SQLHDESC		  hdesc,
197     SQLSMALLINT		  iRecord,
198     SQLSMALLINT		  iField,
199     SQLPOINTER		  rgbValue,
200     SQLINTEGER		  cbValueMax,
201     SQLINTEGER		* pcbValue);
202 
203 SQLRETURN SQL_API SQLGetDescRecW (
204     SQLHDESC		  hdesc,
205     SQLSMALLINT		  iRecord,
206     SQLWCHAR		* szName,
207     SQLSMALLINT		  cbNameMax,
208     SQLSMALLINT		* pcbName,
209     SQLSMALLINT		* pfType,
210     SQLSMALLINT		* pfSubType,
211     SQLLEN		* pLength,
212     SQLSMALLINT		* pPrecision,
213     SQLSMALLINT		* pScale,
214     SQLSMALLINT		* pNullable);
215 
216 SQLRETURN SQL_API SQLGetDiagFieldW (
217     SQLSMALLINT		  fHandleType,
218     SQLHANDLE		  handle,
219     SQLSMALLINT		  iRecord,
220     SQLSMALLINT		  fDiagField,
221     SQLPOINTER		  rgbDiagInfo,
222     SQLSMALLINT		  cbDiagInfoMax,
223     SQLSMALLINT		* pcbDiagInfo);
224 
225 SQLRETURN SQL_API SQLGetDiagRecW (
226     SQLSMALLINT		  fHandleType,
227     SQLHANDLE		  handle,
228     SQLSMALLINT		  iRecord,
229     SQLWCHAR		* szSqlState,
230     SQLINTEGER		* pfNativeError,
231     SQLWCHAR		* szErrorMsg,
232     SQLSMALLINT		  cbErrorMsgMax,
233     SQLSMALLINT		* pcbErrorMsg);
234 #endif
235 
236 SQLRETURN SQL_API SQLPrepareW (
237     SQLHSTMT		  hstmt,
238     SQLWCHAR		* szSqlStr,
239     SQLINTEGER		  cbSqlStr);
240 
241 SQLRETURN SQL_API SQLSetConnectAttrW (
242     SQLHDBC		  hdbc,
243     SQLINTEGER		  fAttribute,
244     SQLPOINTER		  rgbValue,
245     SQLINTEGER		  cbValue);
246 
247 SQLRETURN SQL_API SQLSetCursorNameW (
248     SQLHSTMT		  hstmt,
249     SQLWCHAR		* szCursor,
250     SQLSMALLINT		  cbCursor);
251 
252 SQLRETURN SQL_API SQLColumnsW (
253     SQLHSTMT		  hstmt,
254     SQLWCHAR		* szCatalogName,
255     SQLSMALLINT		  cbCatalogName,
256     SQLWCHAR		* szSchemaName,
257     SQLSMALLINT		  cbSchemaName,
258     SQLWCHAR		* szTableName,
259     SQLSMALLINT		  cbTableName,
260     SQLWCHAR		* szColumnName,
261     SQLSMALLINT		  cbColumnName);
262 
263 SQLRETURN SQL_API SQLGetConnectOptionW (
264     SQLHDBC		  hdbc,
265     SQLUSMALLINT	  fOption,
266     SQLPOINTER		  pvParam);
267 
268 SQLRETURN SQL_API SQLGetInfoW (
269     SQLHDBC		  hdbc,
270     SQLUSMALLINT	  fInfoType,
271     SQLPOINTER		  rgbInfoValue,
272     SQLSMALLINT		  cbInfoValueMax,
273     SQLSMALLINT		* pcbInfoValue);
274 
275 SQLRETURN SQL_API SQLGetTypeInfoW (
276     SQLHSTMT		  StatementHandle,
277     SQLSMALLINT		  DataType);
278 
279 SQLRETURN SQL_API SQLSetConnectOptionW (
280     SQLHDBC		  hdbc,
281     SQLUSMALLINT	  fOption,
282     SQLULEN		  vParam);
283 
284 SQLRETURN SQL_API SQLSpecialColumnsW (
285     SQLHSTMT		  hstmt,
286     SQLUSMALLINT	  fColType,
287     SQLWCHAR		* szCatalogName,
288     SQLSMALLINT		  cbCatalogName,
289     SQLWCHAR		* szSchemaName,
290     SQLSMALLINT		  cbSchemaName,
291     SQLWCHAR		* szTableName,
292     SQLSMALLINT		  cbTableName,
293     SQLUSMALLINT	  fScope,
294     SQLUSMALLINT	  fNullable);
295 
296 SQLRETURN SQL_API SQLStatisticsW (
297     SQLHSTMT		  hstmt,
298     SQLWCHAR		* szCatalogName,
299     SQLSMALLINT		  cbCatalogName,
300     SQLWCHAR		* szSchemaName,
301     SQLSMALLINT		  cbSchemaName,
302     SQLWCHAR		* szTableName,
303     SQLSMALLINT		  cbTableName,
304     SQLUSMALLINT	  fUnique,
305     SQLUSMALLINT	  fAccuracy);
306 
307 SQLRETURN SQL_API SQLTablesW (
308     SQLHSTMT		  hstmt,
309     SQLWCHAR		* szCatalogName,
310     SQLSMALLINT		  cbCatalogName,
311     SQLWCHAR		* szSchemaName,
312     SQLSMALLINT		  cbSchemaName,
313     SQLWCHAR		* szTableName,
314     SQLSMALLINT		  cbTableName,
315     SQLWCHAR		* szTableType,
316     SQLSMALLINT		  cbTableType);
317 
318 SQLRETURN SQL_API SQLDataSourcesW (
319     SQLHENV		  henv,
320     SQLUSMALLINT	  fDirection,
321     SQLWCHAR		* szDSN,
322     SQLSMALLINT		  cbDSNMax,
323     SQLSMALLINT		* pcbDSN,
324     SQLWCHAR		* szDescription,
325     SQLSMALLINT		  cbDescriptionMax,
326     SQLSMALLINT		* pcbDescription);
327 
328 SQLRETURN SQL_API SQLDriverConnectW (
329     SQLHDBC		  hdbc,
330     SQLHWND		  hwnd,
331     SQLWCHAR		* szConnStrIn,
332     SQLSMALLINT		  cbConnStrIn,
333     SQLWCHAR		* szConnStrOut,
334     SQLSMALLINT		  cbConnStrOutMax,
335     SQLSMALLINT		* pcbConnStrOut,
336     SQLUSMALLINT	  fDriverCompletion);
337 
338 SQLRETURN SQL_API SQLBrowseConnectW (
339     SQLHDBC		  hdbc,
340     SQLWCHAR		* szConnStrIn,
341     SQLSMALLINT		  cbConnStrIn,
342     SQLWCHAR		* szConnStrOut,
343     SQLSMALLINT		  cbConnStrOutMax,
344     SQLSMALLINT		* pcbConnStrOut);
345 
346 SQLRETURN SQL_API SQLColumnPrivilegesW (
347     SQLHSTMT		  hstmt,
348     SQLWCHAR		* szCatalogName,
349     SQLSMALLINT		  cbCatalogName,
350     SQLWCHAR		* szSchemaName,
351     SQLSMALLINT		  cbSchemaName,
352     SQLWCHAR		* szTableName,
353     SQLSMALLINT		  cbTableName,
354     SQLWCHAR		* szColumnName,
355     SQLSMALLINT		  cbColumnName);
356 
357 SQLRETURN SQL_API SQLGetStmtAttrW (
358     SQLHSTMT		  hstmt,
359     SQLINTEGER		  fAttribute,
360     SQLPOINTER		  rgbValue,
361     SQLINTEGER		  cbValueMax,
362     SQLINTEGER		* pcbValue);
363 
364 SQLRETURN SQL_API SQLSetStmtAttrW (
365     SQLHSTMT		  hstmt,
366     SQLINTEGER		  fAttribute,
367     SQLPOINTER		  rgbValue,
368     SQLINTEGER		  cbValueMax);
369 
370 SQLRETURN SQL_API SQLForeignKeysW (
371     SQLHSTMT		  hstmt,
372     SQLWCHAR		* szPkCatalogName,
373     SQLSMALLINT		  cbPkCatalogName,
374     SQLWCHAR		* szPkSchemaName,
375     SQLSMALLINT		  cbPkSchemaName,
376     SQLWCHAR		* szPkTableName,
377     SQLSMALLINT		  cbPkTableName,
378     SQLWCHAR		* szFkCatalogName,
379     SQLSMALLINT		  cbFkCatalogName,
380     SQLWCHAR		* szFkSchemaName,
381     SQLSMALLINT		  cbFkSchemaName,
382     SQLWCHAR		* szFkTableName,
383     SQLSMALLINT		  cbFkTableName);
384 
385 SQLRETURN SQL_API SQLNativeSqlW (
386     SQLHDBC		  hdbc,
387     SQLWCHAR		* szSqlStrIn,
388     SQLINTEGER		  cbSqlStrIn,
389     SQLWCHAR		* szSqlStr,
390     SQLINTEGER		  cbSqlStrMax,
391     SQLINTEGER		* pcbSqlStr);
392 
393 SQLRETURN SQL_API SQLPrimaryKeysW (
394     SQLHSTMT		  hstmt,
395     SQLWCHAR		* szCatalogName,
396     SQLSMALLINT		  cbCatalogName,
397     SQLWCHAR		* szSchemaName,
398     SQLSMALLINT		  cbSchemaName,
399     SQLWCHAR		* szTableName,
400     SQLSMALLINT		  cbTableName);
401 
402 SQLRETURN SQL_API SQLProcedureColumnsW (
403     SQLHSTMT		  hstmt,
404     SQLWCHAR		* szCatalogName,
405     SQLSMALLINT		  cbCatalogName,
406     SQLWCHAR		* szSchemaName,
407     SQLSMALLINT		  cbSchemaName,
408     SQLWCHAR		* szProcName,
409     SQLSMALLINT		  cbProcName,
410     SQLWCHAR		* szColumnName,
411     SQLSMALLINT		  cbColumnName);
412 
413 SQLRETURN SQL_API SQLProceduresW (
414     SQLHSTMT		  hstmt,
415     SQLWCHAR		* szCatalogName,
416     SQLSMALLINT		  cbCatalogName,
417     SQLWCHAR		* szSchemaName,
418     SQLSMALLINT		  cbSchemaName,
419     SQLWCHAR		* szProcName,
420     SQLSMALLINT		  cbProcName);
421 
422 SQLRETURN SQL_API SQLTablePrivilegesW (
423     SQLHSTMT		  hstmt,
424     SQLWCHAR		* szCatalogName,
425     SQLSMALLINT		  cbCatalogName,
426     SQLWCHAR		* szSchemaName,
427     SQLSMALLINT		  cbSchemaName,
428     SQLWCHAR		* szTableName,
429     SQLSMALLINT		  cbTableName);
430 
431 SQLRETURN SQL_API SQLDriversW (
432     SQLHENV		  henv,
433     SQLUSMALLINT	  fDirection,
434     SQLWCHAR		* szDriverDesc,
435     SQLSMALLINT		  cbDriverDescMax,
436     SQLSMALLINT		* pcbDriverDesc,
437     SQLWCHAR		* szDriverAttributes,
438     SQLSMALLINT		  cbDrvrAttrMax,
439     SQLSMALLINT		* pcbDrvrAttr);
440 
441 
442 /*
443  *  Function prototypes - ANSI
444  */
445 
446 SQLRETURN SQL_API SQLColAttributeA (
447     SQLHSTMT		  hstmt,
448     SQLUSMALLINT	  iCol,
449     SQLUSMALLINT	  iField,
450     SQLPOINTER		  pCharAttr,
451     SQLSMALLINT		  cbCharAttrMax,
452     SQLSMALLINT		* pcbCharAttr,
453     SQLLEN		* pNumAttr);
454 
455 SQLRETURN SQL_API SQLColAttributesA (
456     SQLHSTMT		  hstmt,
457     SQLUSMALLINT	  icol,
458     SQLUSMALLINT	  fDescType,
459     SQLPOINTER		  rgbDesc,
460     SQLSMALLINT		  cbDescMax,
461     SQLSMALLINT		* pcbDesc,
462     SQLLEN		* pfDesc);
463 
464 SQLRETURN SQL_API SQLConnectA (
465     SQLHDBC		  hdbc,
466     SQLCHAR		* szDSN,
467     SQLSMALLINT		  cbDSN,
468     SQLCHAR		* szUID,
469     SQLSMALLINT		  cbUID,
470     SQLCHAR		* szAuthStr,
471     SQLSMALLINT		  cbAuthStr);
472 
473 SQLRETURN SQL_API SQLDescribeColA (
474     SQLHSTMT		  hstmt,
475     SQLUSMALLINT	  icol,
476     SQLCHAR		* szColName,
477     SQLSMALLINT		  cbColNameMax,
478     SQLSMALLINT		* pcbColName,
479     SQLSMALLINT		* pfSqlType,
480     SQLULEN		* pcbColDef,
481     SQLSMALLINT		* pibScale,
482     SQLSMALLINT		* pfNullable);
483 
484 SQLRETURN SQL_API SQLErrorA (
485     SQLHENV		  henv,
486     SQLHDBC		  hdbc,
487     SQLHSTMT		  hstmt,
488     SQLCHAR		* szSqlState,
489     SQLINTEGER		* pfNativeError,
490     SQLCHAR		* szErrorMsg,
491     SQLSMALLINT		  cbErrorMsgMax,
492     SQLSMALLINT		* pcbErrorMsg);
493 
494 SQLRETURN SQL_API SQLExecDirectA (
495     SQLHSTMT		  hstmt,
496     SQLCHAR		* szSqlStr,
497     SQLINTEGER		  cbSqlStr);
498 
499 SQLRETURN SQL_API SQLGetConnectAttrA (
500     SQLHDBC		  hdbc,
501     SQLINTEGER		  fAttribute,
502     SQLPOINTER		  rgbValue,
503     SQLINTEGER		  cbValueMax,
504     SQLINTEGER		* pcbValue);
505 
506 SQLRETURN SQL_API SQLGetCursorNameA (
507     SQLHSTMT		  hstmt,
508     SQLCHAR		* szCursor,
509     SQLSMALLINT		  cbCursorMax,
510     SQLSMALLINT		* pcbCursor);
511 
512 #if (ODBCVER >= 0x0300)
513 SQLRETURN SQL_API SQLSetDescFieldA (
514     SQLHDESC		  DescriptorHandle,
515     SQLSMALLINT		  RecNumber,
516     SQLSMALLINT		  FieldIdentifier,
517     SQLPOINTER		  Value,
518     SQLINTEGER		  BufferLength);
519 
520 SQLRETURN SQL_API SQLGetDescFieldA (
521     SQLHDESC		  hdesc,
522     SQLSMALLINT		  iRecord,
523     SQLSMALLINT		  iField,
524     SQLPOINTER		  rgbValue,
525     SQLINTEGER		  cbValueMax,
526     SQLINTEGER		* pcbValue);
527 
528 SQLRETURN SQL_API SQLGetDescRecA (
529     SQLHDESC		  hdesc,
530     SQLSMALLINT		  iRecord,
531     SQLCHAR		* szName,
532     SQLSMALLINT		  cbNameMax,
533     SQLSMALLINT		* pcbName,
534     SQLSMALLINT		* pfType,
535     SQLSMALLINT		* pfSubType,
536     SQLLEN		* pLength,
537     SQLSMALLINT		* pPrecision,
538     SQLSMALLINT		* pScale,
539     SQLSMALLINT		* pNullable);
540 
541 SQLRETURN SQL_API SQLGetDiagFieldA (
542     SQLSMALLINT		  fHandleType,
543     SQLHANDLE		  handle,
544     SQLSMALLINT		  iRecord,
545     SQLSMALLINT		  fDiagField,
546     SQLPOINTER		  rgbDiagInfo,
547     SQLSMALLINT		  cbDiagInfoMax,
548     SQLSMALLINT		* pcbDiagInfo);
549 
550 SQLRETURN SQL_API SQLGetDiagRecA (
551     SQLSMALLINT		  fHandleType,
552     SQLHANDLE		  handle,
553     SQLSMALLINT		  iRecord,
554     SQLCHAR		* szSqlState,
555     SQLINTEGER		* pfNativeError,
556     SQLCHAR		* szErrorMsg,
557     SQLSMALLINT		  cbErrorMsgMax,
558     SQLSMALLINT		* pcbErrorMsg);
559 #endif
560 
561 SQLRETURN SQL_API SQLPrepareA (
562     SQLHSTMT		  hstmt,
563     SQLCHAR		* szSqlStr,
564     SQLINTEGER		  cbSqlStr);
565 
566 SQLRETURN SQL_API SQLSetConnectAttrA (
567     SQLHDBC		  hdbc,
568     SQLINTEGER		  fAttribute,
569     SQLPOINTER		  rgbValue,
570     SQLINTEGER		  cbValue);
571 
572 SQLRETURN SQL_API SQLSetCursorNameA (
573     SQLHSTMT		  hstmt,
574     SQLCHAR		* szCursor,
575     SQLSMALLINT		  cbCursor);
576 
577 SQLRETURN SQL_API SQLColumnsA (
578     SQLHSTMT		  hstmt,
579     SQLCHAR		* szCatalogName,
580     SQLSMALLINT		  cbCatalogName,
581     SQLCHAR		* szSchemaName,
582     SQLSMALLINT		  cbSchemaName,
583     SQLCHAR		* szTableName,
584     SQLSMALLINT		  cbTableName,
585     SQLCHAR		* szColumnName,
586     SQLSMALLINT		  cbColumnName);
587 
588 SQLRETURN SQL_API SQLGetConnectOptionA (
589     SQLHDBC		  hdbc,
590     SQLUSMALLINT	  fOption,
591     SQLPOINTER		  pvParam);
592 
593 SQLRETURN SQL_API SQLGetInfoA (
594     SQLHDBC		  hdbc,
595     SQLUSMALLINT	  fInfoType,
596     SQLPOINTER		  rgbInfoValue,
597     SQLSMALLINT		  cbInfoValueMax,
598     SQLSMALLINT		* pcbInfoValue);
599 
600 SQLRETURN SQL_API SQLGetTypeInfoA (
601     SQLHSTMT		  StatementHandle,
602     SQLSMALLINT		  DataType);
603 
604 SQLRETURN SQL_API SQLSetConnectOptionA (
605     SQLHDBC		  hdbc,
606     SQLUSMALLINT	  fOption,
607     SQLULEN		  vParam);
608 
609 SQLRETURN SQL_API SQLSpecialColumnsA (
610     SQLHSTMT		  hstmt,
611     SQLUSMALLINT	  fColType,
612     SQLCHAR		* szCatalogName,
613     SQLSMALLINT		  cbCatalogName,
614     SQLCHAR		* szSchemaName,
615     SQLSMALLINT		  cbSchemaName,
616     SQLCHAR		* szTableName,
617     SQLSMALLINT		  cbTableName,
618     SQLUSMALLINT	  fScope,
619     SQLUSMALLINT	  fNullable);
620 
621 SQLRETURN SQL_API SQLStatisticsA (
622     SQLHSTMT		  hstmt,
623     SQLCHAR		* szCatalogName,
624     SQLSMALLINT		  cbCatalogName,
625     SQLCHAR		* szSchemaName,
626     SQLSMALLINT		  cbSchemaName,
627     SQLCHAR		* szTableName,
628     SQLSMALLINT		  cbTableName,
629     SQLUSMALLINT	  fUnique,
630     SQLUSMALLINT	  fAccuracy);
631 
632 SQLRETURN SQL_API SQLTablesA (
633     SQLHSTMT		  hstmt,
634     SQLCHAR		* szCatalogName,
635     SQLSMALLINT		  cbCatalogName,
636     SQLCHAR		* szSchemaName,
637     SQLSMALLINT		  cbSchemaName,
638     SQLCHAR		* szTableName,
639     SQLSMALLINT		  cbTableName,
640     SQLCHAR		* szTableType,
641     SQLSMALLINT		  cbTableType);
642 
643 SQLRETURN SQL_API SQLDataSourcesA (
644     SQLHENV		  henv,
645     SQLUSMALLINT	  fDirection,
646     SQLCHAR		* szDSN,
647     SQLSMALLINT		  cbDSNMax,
648     SQLSMALLINT		* pcbDSN,
649     SQLCHAR		* szDescription,
650     SQLSMALLINT		  cbDescriptionMax,
651     SQLSMALLINT		* pcbDescription);
652 
653 SQLRETURN SQL_API SQLDriverConnectA (
654     SQLHDBC		  hdbc,
655     SQLHWND		  hwnd,
656     SQLCHAR		* szConnStrIn,
657     SQLSMALLINT		  cbConnStrIn,
658     SQLCHAR		* szConnStrOut,
659     SQLSMALLINT		  cbConnStrOutMax,
660     SQLSMALLINT		* pcbConnStrOut,
661     SQLUSMALLINT	  fDriverCompletion);
662 
663 SQLRETURN SQL_API SQLBrowseConnectA (
664     SQLHDBC		  hdbc,
665     SQLCHAR		* szConnStrIn,
666     SQLSMALLINT		  cbConnStrIn,
667     SQLCHAR		* szConnStrOut,
668     SQLSMALLINT		  cbConnStrOutMax,
669     SQLSMALLINT		* pcbConnStrOut);
670 
671 SQLRETURN SQL_API SQLColumnPrivilegesA (
672     SQLHSTMT		  hstmt,
673     SQLCHAR		* szCatalogName,
674     SQLSMALLINT		  cbCatalogName,
675     SQLCHAR		* szSchemaName,
676     SQLSMALLINT		  cbSchemaName,
677     SQLCHAR		* szTableName,
678     SQLSMALLINT		  cbTableName,
679     SQLCHAR		* szColumnName,
680     SQLSMALLINT		  cbColumnName);
681 
682 SQLRETURN SQL_API SQLGetStmtAttrA (
683     SQLHSTMT		  hstmt,
684     SQLINTEGER		  fAttribute,
685     SQLPOINTER		  rgbValue,
686     SQLINTEGER		  cbValueMax,
687     SQLINTEGER		* pcbValue);
688 
689 SQLRETURN SQL_API SQLSetStmtAttrA (
690     SQLHSTMT		  hstmt,
691     SQLINTEGER		  fAttribute,
692     SQLPOINTER		  rgbValue,
693     SQLINTEGER		  cbValueMax);
694 
695 SQLRETURN SQL_API SQLForeignKeysA (
696     SQLHSTMT		  hstmt,
697     SQLCHAR		* szPkCatalogName,
698     SQLSMALLINT		  cbPkCatalogName,
699     SQLCHAR		* szPkSchemaName,
700     SQLSMALLINT		  cbPkSchemaName,
701     SQLCHAR		* szPkTableName,
702     SQLSMALLINT		  cbPkTableName,
703     SQLCHAR		* szFkCatalogName,
704     SQLSMALLINT		  cbFkCatalogName,
705     SQLCHAR		* szFkSchemaName,
706     SQLSMALLINT		  cbFkSchemaName,
707     SQLCHAR		* szFkTableName,
708     SQLSMALLINT		  cbFkTableName);
709 
710 SQLRETURN SQL_API SQLNativeSqlA (
711     SQLHDBC		  hdbc,
712     SQLCHAR		* szSqlStrIn,
713     SQLINTEGER		  cbSqlStrIn,
714     SQLCHAR		* szSqlStr,
715     SQLINTEGER		  cbSqlStrMax,
716     SQLINTEGER		* pcbSqlStr);
717 
718 SQLRETURN SQL_API SQLPrimaryKeysA (
719     SQLHSTMT		  hstmt,
720     SQLCHAR		* szCatalogName,
721     SQLSMALLINT		  cbCatalogName,
722     SQLCHAR		* szSchemaName,
723     SQLSMALLINT		  cbSchemaName,
724     SQLCHAR		* szTableName,
725     SQLSMALLINT		  cbTableName);
726 
727 SQLRETURN SQL_API SQLProcedureColumnsA (
728     SQLHSTMT		  hstmt,
729     SQLCHAR		* szCatalogName,
730     SQLSMALLINT		  cbCatalogName,
731     SQLCHAR		* szSchemaName,
732     SQLSMALLINT		  cbSchemaName,
733     SQLCHAR		* szProcName,
734     SQLSMALLINT		  cbProcName,
735     SQLCHAR		* szColumnName,
736     SQLSMALLINT		  cbColumnName);
737 
738 SQLRETURN SQL_API SQLProceduresA (
739     SQLHSTMT		  hstmt,
740     SQLCHAR		* szCatalogName,
741     SQLSMALLINT		  cbCatalogName,
742     SQLCHAR		* szSchemaName,
743     SQLSMALLINT		  cbSchemaName,
744     SQLCHAR		* szProcName,
745     SQLSMALLINT		  cbProcName);
746 
747 SQLRETURN SQL_API SQLTablePrivilegesA (
748     SQLHSTMT		  hstmt,
749     SQLCHAR		* szCatalogName,
750     SQLSMALLINT		  cbCatalogName,
751     SQLCHAR		* szSchemaName,
752     SQLSMALLINT		  cbSchemaName,
753     SQLCHAR		* szTableName,
754     SQLSMALLINT		  cbTableName);
755 
756 SQLRETURN SQL_API SQLDriversA (
757     SQLHENV		  henv,
758     SQLUSMALLINT	  fDirection,
759     SQLCHAR		* szDriverDesc,
760     SQLSMALLINT		  cbDriverDescMax,
761     SQLSMALLINT		* pcbDriverDesc,
762     SQLCHAR		* szDriverAttributes,
763     SQLSMALLINT		  cbDrvrAttrMax,
764     SQLSMALLINT		* pcbDrvrAttr);
765 
766 
767 /*
768  *  Mapping macros for Unicode
769  */
770 #ifndef SQL_NOUNICODEMAP 	/* define this to disable the mapping */
771 #ifdef  UNICODE
772 
773 #define SQLColAttribute		SQLColAttributeW
774 #define SQLColAttributes	SQLColAttributesW
775 #define SQLConnect		SQLConnectW
776 #define SQLDescribeCol		SQLDescribeColW
777 #define SQLError		SQLErrorW
778 #define SQLExecDirect		SQLExecDirectW
779 #define SQLGetConnectAttr	SQLGetConnectAttrW
780 #define SQLGetCursorName	SQLGetCursorNameW
781 #define SQLGetDescField		SQLGetDescFieldW
782 #define SQLGetDescRec		SQLGetDescRecW
783 #define SQLGetDiagField		SQLGetDiagFieldW
784 #define SQLGetDiagRec		SQLGetDiagRecW
785 #define SQLPrepare		SQLPrepareW
786 #define SQLSetConnectAttr	SQLSetConnectAttrW
787 #define SQLSetCursorName	SQLSetCursorNameW
788 #define SQLSetDescField		SQLSetDescFieldW
789 #define SQLSetStmtAttr		SQLSetStmtAttrW
790 #define SQLGetStmtAttr		SQLGetStmtAttrW
791 #define SQLColumns		SQLColumnsW
792 #define SQLGetConnectOption	SQLGetConnectOptionW
793 #define SQLGetInfo		SQLGetInfoW
794 #define SQLGetTypeInfo		SQLGetTypeInfoW
795 #define SQLSetConnectOption	SQLSetConnectOptionW
796 #define SQLSpecialColumns	SQLSpecialColumnsW
797 #define SQLStatistics		SQLStatisticsW
798 #define SQLTables		SQLTablesW
799 #define SQLDataSources		SQLDataSourcesW
800 #define SQLDriverConnect	SQLDriverConnectW
801 #define SQLBrowseConnect	SQLBrowseConnectW
802 #define SQLColumnPrivileges	SQLColumnPrivilegesW
803 #define SQLForeignKeys		SQLForeignKeysW
804 #define SQLNativeSql		SQLNativeSqlW
805 #define SQLPrimaryKeys		SQLPrimaryKeysW
806 #define SQLProcedureColumns	SQLProcedureColumnsW
807 #define SQLProcedures		SQLProceduresW
808 #define SQLTablePrivileges	SQLTablePrivilegesW
809 #define SQLDrivers		SQLDriversW
810 
811 #endif /* UNICODE */
812 #endif /* SQL_NOUNICODEMAP */
813 
814 #ifdef __cplusplus
815 }
816 #endif
817 
818 #endif /* _SQLUCODE_H */
819