sqlucode.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
  1. /*****************************************************************
  2. ** SQLUCODE.H - This is the the unicode include for ODBC Core functions.
  3. **
  4. ** preconditions:
  5. ** #include "windows.h"
  6. ** #incluee "sql.h"
  7. **
  8. ** (C) Copyright 1990 - 1996 By Microsoft Corp.
  9. **
  10. ** Created 6/20 for 3.00 specification
  11. *********************************************************************/
  12. #ifndef __SQLUCODE
  13. #define __SQLUCODE
  14. #ifdef __cplusplus
  15. extern "C" { /* Assume C declarations for C++ */
  16. #endif /* __cplusplus */
  17. #include <sqlext.h>
  18. #define SQL_WCHAR (-8)
  19. #define SQL_WVARCHAR (-9)
  20. #define SQL_WLONGVARCHAR (-10)
  21. #define SQL_C_WCHAR SQL_WCHAR
  22. #ifdef UNICODE
  23. #define SQL_C_TCHAR SQL_C_WCHAR
  24. #else
  25. #define SQL_C_TCHAR SQL_C_CHAR
  26. #endif
  27. #define SQL_SQLSTATE_SIZEW 10 /* size of SQLSTATE for unicode */
  28. #ifndef RC_INVOKED
  29. // UNICODE versions
  30. SQLRETURN SQL_API SQLColAttributeW(
  31. SQLHSTMT hstmt,
  32. SQLSMALLINT iCol,
  33. SQLSMALLINT iField,
  34. SQLPOINTER pCharAttr,
  35. SQLSMALLINT cbCharAttrMax,
  36. SQLSMALLINT *pcbCharAttr,
  37. SQLPOINTER pNumAttr);
  38. SQLRETURN SQL_API SQLColAttributesW(
  39. SQLHSTMT hstmt,
  40. SQLUSMALLINT icol,
  41. SQLUSMALLINT fDescType,
  42. SQLPOINTER rgbDesc,
  43. SQLSMALLINT cbDescMax,
  44. SQLSMALLINT *pcbDesc,
  45. SQLINTEGER *pfDesc);
  46. SQLRETURN SQL_API SQLConnectW(
  47. SQLHDBC hdbc,
  48. SQLWCHAR *szDSN,
  49. SQLSMALLINT cbDSN,
  50. SQLWCHAR *szUID,
  51. SQLSMALLINT cbUID,
  52. SQLWCHAR *szAuthStr,
  53. SQLSMALLINT cbAuthStr);
  54. SQLRETURN SQL_API SQLDescribeColW(
  55. SQLHSTMT hstmt,
  56. SQLUSMALLINT icol,
  57. SQLWCHAR *szColName,
  58. SQLSMALLINT cbColNameMax,
  59. SQLSMALLINT *pcbColName,
  60. SQLSMALLINT *pfSqlType,
  61. SQLUINTEGER *pcbColDef,
  62. SQLSMALLINT *pibScale,
  63. SQLSMALLINT *pfNullable);
  64. SQLRETURN SQL_API SQLErrorW(
  65. SQLHENV henv,
  66. SQLHDBC hdbc,
  67. SQLHSTMT hstmt,
  68. SQLWCHAR *szSqlState,
  69. SQLINTEGER *pfNativeError,
  70. SQLWCHAR *szErrorMsg,
  71. SQLSMALLINT cbErrorMsgMax,
  72. SQLSMALLINT *pcbErrorMsg);
  73. SQLRETURN SQL_API SQLExecDirectW(
  74. SQLHSTMT hstmt,
  75. SQLWCHAR *szSqlStr,
  76. SQLINTEGER cbSqlStr);
  77. SQLRETURN SQL_API SQLGetConnectAttrW(
  78. SQLHDBC hdbc,
  79. SQLINTEGER fAttribute,
  80. SQLPOINTER rgbValue,
  81. SQLINTEGER cbValueMax,
  82. SQLINTEGER *pcbValue);
  83. SQLRETURN SQL_API SQLGetCursorNameW(
  84. SQLHSTMT hstmt,
  85. SQLWCHAR *szCursor,
  86. SQLSMALLINT cbCursorMax,
  87. SQLSMALLINT *pcbCursor);
  88. #if (ODBCVER >= 0x0300)
  89. SQLRETURN SQL_API SQLSetDescFieldW(SQLHDESC DescriptorHandle,
  90. SQLSMALLINT RecNumber,
  91. SQLSMALLINT FieldIdentifier,
  92. SQLPOINTER Value,
  93. SQLINTEGER BufferLength);
  94. SQLRETURN SQL_API SQLGetDescFieldW(
  95. SQLHDESC hdesc,
  96. SQLSMALLINT iRecord,
  97. SQLSMALLINT iField,
  98. SQLPOINTER rgbValue,
  99. SQLINTEGER cbValueMax,
  100. SQLINTEGER *pcbValue);
  101. SQLRETURN SQL_API SQLGetDescRecW(
  102. SQLHDESC hdesc,
  103. SQLSMALLINT iRecord,
  104. SQLWCHAR *szName,
  105. SQLSMALLINT cbNameMax,
  106. SQLSMALLINT *pcbName,
  107. SQLSMALLINT *pfType,
  108. SQLSMALLINT *pfSubType,
  109. SQLINTEGER *pLength,
  110. SQLSMALLINT *pPrecision,
  111. SQLSMALLINT *pScale,
  112. SQLSMALLINT *pNullable);
  113. SQLRETURN SQL_API SQLGetDiagFieldW(
  114. SQLSMALLINT fHandleType,
  115. SQLHANDLE handle,
  116. SQLSMALLINT iRecord,
  117. SQLSMALLINT fDiagField,
  118. SQLPOINTER rgbDiagInfo,
  119. SQLSMALLINT cbDiagInfoMax,
  120. SQLSMALLINT *pcbDiagInfo);
  121. SQLRETURN SQL_API SQLGetDiagRecW(
  122. SQLSMALLINT fHandleType,
  123. SQLHANDLE handle,
  124. SQLSMALLINT iRecord,
  125. SQLWCHAR *szSqlState,
  126. SQLINTEGER *pfNativeError,
  127. SQLWCHAR *szErrorMsg,
  128. SQLSMALLINT cbErrorMsgMax,
  129. SQLSMALLINT *pcbErrorMsg);
  130. #endif
  131. SQLRETURN SQL_API SQLPrepareW(
  132. SQLHSTMT hstmt,
  133. SQLWCHAR *szSqlStr,
  134. SQLINTEGER cbSqlStr);
  135. SQLRETURN SQL_API SQLSetConnectAttrW(
  136. SQLHDBC hdbc,
  137. SQLINTEGER fAttribute,
  138. SQLPOINTER rgbValue,
  139. SQLINTEGER cbValue);
  140. SQLRETURN SQL_API SQLSetCursorNameW(
  141. SQLHSTMT hstmt,
  142. SQLWCHAR *szCursor,
  143. SQLSMALLINT cbCursor);
  144. SQLRETURN SQL_API SQLColumnsW(
  145. SQLHSTMT hstmt,
  146. SQLWCHAR *szCatalogName,
  147. SQLSMALLINT cbCatalogName,
  148. SQLWCHAR *szSchemaName,
  149. SQLSMALLINT cbSchemaName,
  150. SQLWCHAR *szTableName,
  151. SQLSMALLINT cbTableName,
  152. SQLWCHAR *szColumnName,
  153. SQLSMALLINT cbColumnName);
  154. SQLRETURN SQL_API SQLGetConnectOptionW(
  155. SQLHDBC hdbc,
  156. SQLUSMALLINT fOption,
  157. SQLPOINTER pvParam);
  158. SQLRETURN SQL_API SQLGetInfoW(
  159. SQLHDBC hdbc,
  160. SQLUSMALLINT fInfoType,
  161. SQLPOINTER rgbInfoValue,
  162. SQLSMALLINT cbInfoValueMax,
  163. SQLSMALLINT *pcbInfoValue);
  164. SQLRETURN SQL_API SQLGetTypeInfoW(
  165. SQLHSTMT StatementHandle,
  166. SQLSMALLINT DataTyoe);
  167. SQLRETURN SQL_API SQLSetConnectOptionW(
  168. SQLHDBC hdbc,
  169. SQLUSMALLINT fOption,
  170. SQLUINTEGER vParam);
  171. SQLRETURN SQL_API SQLSpecialColumnsW(
  172. SQLHSTMT hstmt,
  173. SQLUSMALLINT fColType,
  174. SQLWCHAR *szCatalogName,
  175. SQLSMALLINT cbCatalogName,
  176. SQLWCHAR *szSchemaName,
  177. SQLSMALLINT cbSchemaName,
  178. SQLWCHAR *szTableName,
  179. SQLSMALLINT cbTableName,
  180. SQLUSMALLINT fScope,
  181. SQLUSMALLINT fNullable);
  182. SQLRETURN SQL_API SQLStatisticsW(
  183. SQLHSTMT hstmt,
  184. SQLWCHAR *szCatalogName,
  185. SQLSMALLINT cbCatalogName,
  186. SQLWCHAR *szSchemaName,
  187. SQLSMALLINT cbSchemaName,
  188. SQLWCHAR *szTableName,
  189. SQLSMALLINT cbTableName,
  190. SQLUSMALLINT fUnique,
  191. SQLUSMALLINT fAccuracy);
  192. SQLRETURN SQL_API SQLTablesW(
  193. SQLHSTMT hstmt,
  194. SQLWCHAR *szCatalogName,
  195. SQLSMALLINT cbCatalogName,
  196. SQLWCHAR *szSchemaName,
  197. SQLSMALLINT cbSchemaName,
  198. SQLWCHAR *szTableName,
  199. SQLSMALLINT cbTableName,
  200. SQLWCHAR *szTableType,
  201. SQLSMALLINT cbTableType);
  202. SQLRETURN SQL_API SQLDataSourcesW(
  203. SQLHENV henv,
  204. SQLUSMALLINT fDirection,
  205. SQLWCHAR *szDSN,
  206. SQLSMALLINT cbDSNMax,
  207. SQLSMALLINT *pcbDSN,
  208. SQLWCHAR *szDescription,
  209. SQLSMALLINT cbDescriptionMax,
  210. SQLSMALLINT *pcbDescription);
  211. SQLRETURN SQL_API SQLDriverConnectW(
  212. SQLHDBC hdbc,
  213. SQLHWND hwnd,
  214. SQLWCHAR *szConnStrIn,
  215. SQLSMALLINT cbConnStrIn,
  216. SQLWCHAR *szConnStrOut,
  217. SQLSMALLINT cbConnStrOutMax,
  218. SQLSMALLINT *pcbConnStrOut,
  219. SQLUSMALLINT fDriverCompletion);
  220. SQLRETURN SQL_API SQLBrowseConnectW(
  221. SQLHDBC hdbc,
  222. SQLWCHAR *szConnStrIn,
  223. SQLSMALLINT cbConnStrIn,
  224. SQLWCHAR *szConnStrOut,
  225. SQLSMALLINT cbConnStrOutMax,
  226. SQLSMALLINT *pcbConnStrOut);
  227. SQLRETURN SQL_API SQLColumnPrivilegesW(
  228. SQLHSTMT hstmt,
  229. SQLWCHAR *szCatalogName,
  230. SQLSMALLINT cbCatalogName,
  231. SQLWCHAR *szSchemaName,
  232. SQLSMALLINT cbSchemaName,
  233. SQLWCHAR *szTableName,
  234. SQLSMALLINT cbTableName,
  235. SQLWCHAR *szColumnName,
  236. SQLSMALLINT cbColumnName);
  237. SQLRETURN SQL_API SQLGetStmtAttrW(
  238. SQLHSTMT hstmt,
  239. SQLINTEGER fAttribute,
  240. SQLPOINTER rgbValue,
  241. SQLINTEGER cbValueMax,
  242. SQLINTEGER *pcbValue);
  243. SQLRETURN SQL_API SQLSetStmtAttrW(
  244. SQLHSTMT hstmt,
  245. SQLINTEGER fAttribute,
  246. SQLPOINTER rgbValue,
  247. SQLINTEGER cbValueMax);
  248. SQLRETURN SQL_API SQLForeignKeysW(
  249. SQLHSTMT hstmt,
  250. SQLWCHAR *szPkCatalogName,
  251. SQLSMALLINT cbPkCatalogName,
  252. SQLWCHAR *szPkSchemaName,
  253. SQLSMALLINT cbPkSchemaName,
  254. SQLWCHAR *szPkTableName,
  255. SQLSMALLINT cbPkTableName,
  256. SQLWCHAR *szFkCatalogName,
  257. SQLSMALLINT cbFkCatalogName,
  258. SQLWCHAR *szFkSchemaName,
  259. SQLSMALLINT cbFkSchemaName,
  260. SQLWCHAR *szFkTableName,
  261. SQLSMALLINT cbFkTableName);
  262. SQLRETURN SQL_API SQLNativeSqlW(
  263. SQLHDBC hdbc,
  264. SQLWCHAR *szSqlStrIn,
  265. SQLINTEGER cbSqlStrIn,
  266. SQLWCHAR *szSqlStr,
  267. SQLINTEGER cbSqlStrMax,
  268. SQLINTEGER *pcbSqlStr);
  269. SQLRETURN SQL_API SQLPrimaryKeysW(
  270. SQLHSTMT hstmt,
  271. SQLWCHAR *szCatalogName,
  272. SQLSMALLINT cbCatalogName,
  273. SQLWCHAR *szSchemaName,
  274. SQLSMALLINT cbSchemaName,
  275. SQLWCHAR *szTableName,
  276. SQLSMALLINT cbTableName);
  277. SQLRETURN SQL_API SQLProcedureColumnsW(
  278. SQLHSTMT hstmt,
  279. SQLWCHAR *szCatalogName,
  280. SQLSMALLINT cbCatalogName,
  281. SQLWCHAR *szSchemaName,
  282. SQLSMALLINT cbSchemaName,
  283. SQLWCHAR *szProcName,
  284. SQLSMALLINT cbProcName,
  285. SQLWCHAR *szColumnName,
  286. SQLSMALLINT cbColumnName);
  287. SQLRETURN SQL_API SQLProceduresW(
  288. SQLHSTMT hstmt,
  289. SQLWCHAR *szCatalogName,
  290. SQLSMALLINT cbCatalogName,
  291. SQLWCHAR *szSchemaName,
  292. SQLSMALLINT cbSchemaName,
  293. SQLWCHAR *szProcName,
  294. SQLSMALLINT cbProcName);
  295. SQLRETURN SQL_API SQLTablePrivilegesW(
  296. SQLHSTMT hstmt,
  297. SQLWCHAR *szCatalogName,
  298. SQLSMALLINT cbCatalogName,
  299. SQLWCHAR *szSchemaName,
  300. SQLSMALLINT cbSchemaName,
  301. SQLWCHAR *szTableName,
  302. SQLSMALLINT cbTableName);
  303. SQLRETURN SQL_API SQLDriversW(
  304. SQLHENV henv,
  305. SQLUSMALLINT fDirection,
  306. SQLWCHAR *szDriverDesc,
  307. SQLSMALLINT cbDriverDescMax,
  308. SQLSMALLINT *pcbDriverDesc,
  309. SQLWCHAR *szDriverAttributes,
  310. SQLSMALLINT cbDrvrAttrMax,
  311. SQLSMALLINT *pcbDrvrAttr);
  312. // ANSI versions
  313. SQLRETURN SQL_API SQLColAttributeA(
  314. SQLHSTMT hstmt,
  315. SQLSMALLINT iCol,
  316. SQLSMALLINT iField,
  317. SQLPOINTER pCharAttr,
  318. SQLSMALLINT cbCharAttrMax,
  319. SQLSMALLINT *pcbCharAttr,
  320. SQLPOINTER pNumAttr);
  321. SQLRETURN SQL_API SQLColAttributesA(
  322. SQLHSTMT hstmt,
  323. SQLUSMALLINT icol,
  324. SQLUSMALLINT fDescType,
  325. SQLPOINTER rgbDesc,
  326. SQLSMALLINT cbDescMax,
  327. SQLSMALLINT *pcbDesc,
  328. SQLINTEGER *pfDesc);
  329. SQLRETURN SQL_API SQLConnectA(
  330. SQLHDBC hdbc,
  331. SQLCHAR *szDSN,
  332. SQLSMALLINT cbDSN,
  333. SQLCHAR *szUID,
  334. SQLSMALLINT cbUID,
  335. SQLCHAR *szAuthStr,
  336. SQLSMALLINT cbAuthStr);
  337. SQLRETURN SQL_API SQLDescribeColA(
  338. SQLHSTMT hstmt,
  339. SQLUSMALLINT icol,
  340. SQLCHAR *szColName,
  341. SQLSMALLINT cbColNameMax,
  342. SQLSMALLINT *pcbColName,
  343. SQLSMALLINT *pfSqlType,
  344. SQLUINTEGER *pcbColDef,
  345. SQLSMALLINT *pibScale,
  346. SQLSMALLINT *pfNullable);
  347. SQLRETURN SQL_API SQLErrorA(
  348. SQLHENV henv,
  349. SQLHDBC hdbc,
  350. SQLHSTMT hstmt,
  351. SQLCHAR *szSqlState,
  352. SQLINTEGER *pfNativeError,
  353. SQLCHAR *szErrorMsg,
  354. SQLSMALLINT cbErrorMsgMax,
  355. SQLSMALLINT *pcbErrorMsg);
  356. SQLRETURN SQL_API SQLExecDirectA(
  357. SQLHSTMT hstmt,
  358. SQLCHAR *szSqlStr,
  359. SQLINTEGER cbSqlStr);
  360. SQLRETURN SQL_API SQLGetConnectAttrA(
  361. SQLHDBC hdbc,
  362. SQLINTEGER fAttribute,
  363. SQLPOINTER rgbValue,
  364. SQLINTEGER cbValueMax,
  365. SQLINTEGER *pcbValue);
  366. SQLRETURN SQL_API SQLGetCursorNameA(
  367. SQLHSTMT hstmt,
  368. SQLCHAR *szCursor,
  369. SQLSMALLINT cbCursorMax,
  370. SQLSMALLINT *pcbCursor);
  371. #if (ODBCVER >= 0x0300)
  372. SQLRETURN SQL_API SQLGetDescFieldA(
  373. SQLHDESC hdesc,
  374. SQLSMALLINT iRecord,
  375. SQLSMALLINT iField,
  376. SQLPOINTER rgbValue,
  377. SQLINTEGER cbValueMax,
  378. SQLINTEGER *pcbValue);
  379. SQLRETURN SQL_API SQLGetDescRecA(
  380. SQLHDESC hdesc,
  381. SQLSMALLINT iRecord,
  382. SQLCHAR *szName,
  383. SQLSMALLINT cbNameMax,
  384. SQLSMALLINT *pcbName,
  385. SQLSMALLINT *pfType,
  386. SQLSMALLINT *pfSubType,
  387. SQLINTEGER *pLength,
  388. SQLSMALLINT *pPrecision,
  389. SQLSMALLINT *pScale,
  390. SQLSMALLINT *pNullable);
  391. SQLRETURN SQL_API SQLGetDiagFieldA(
  392. SQLSMALLINT fHandleType,
  393. SQLHANDLE handle,
  394. SQLSMALLINT iRecord,
  395. SQLSMALLINT fDiagField,
  396. SQLPOINTER rgbDiagInfo,
  397. SQLSMALLINT cbDiagInfoMax,
  398. SQLSMALLINT *pcbDiagInfo);
  399. SQLRETURN SQL_API SQLGetDiagRecA(
  400. SQLSMALLINT fHandleType,
  401. SQLHANDLE handle,
  402. SQLSMALLINT iRecord,
  403. SQLCHAR *szSqlState,
  404. SQLINTEGER *pfNativeError,
  405. SQLCHAR *szErrorMsg,
  406. SQLSMALLINT cbErrorMsgMax,
  407. SQLSMALLINT *pcbErrorMsg);
  408. SQLRETURN SQL_API SQLGetStmtAttrA(
  409. SQLHSTMT hstmt,
  410. SQLINTEGER fAttribute,
  411. SQLPOINTER rgbValue,
  412. SQLINTEGER cbValueMax,
  413. SQLINTEGER *pcbValue);
  414. #endif
  415. SQLRETURN SQL_API SQLGetTypeInfoA(
  416. SQLHSTMT StatementHandle,
  417. SQLSMALLINT DataTyoe);
  418. SQLRETURN SQL_API SQLPrepareA(
  419. SQLHSTMT hstmt,
  420. SQLCHAR *szSqlStr,
  421. SQLINTEGER cbSqlStr);
  422. SQLRETURN SQL_API SQLSetConnectAttrA(
  423. SQLHDBC hdbc,
  424. SQLINTEGER fAttribute,
  425. SQLPOINTER rgbValue,
  426. SQLINTEGER cbValue);
  427. SQLRETURN SQL_API SQLSetCursorNameA(
  428. SQLHSTMT hstmt,
  429. SQLCHAR *szCursor,
  430. SQLSMALLINT cbCursor);
  431. SQLRETURN SQL_API SQLColumnsA(
  432. SQLHSTMT hstmt,
  433. SQLCHAR *szCatalogName,
  434. SQLSMALLINT cbCatalogName,
  435. SQLCHAR *szSchemaName,
  436. SQLSMALLINT cbSchemaName,
  437. SQLCHAR *szTableName,
  438. SQLSMALLINT cbTableName,
  439. SQLCHAR *szColumnName,
  440. SQLSMALLINT cbColumnName);
  441. SQLRETURN SQL_API SQLGetConnectOptionA(
  442. SQLHDBC hdbc,
  443. SQLUSMALLINT fOption,
  444. SQLPOINTER pvParam);
  445. SQLRETURN SQL_API SQLGetInfoA(
  446. SQLHDBC hdbc,
  447. SQLUSMALLINT fInfoType,
  448. SQLPOINTER rgbInfoValue,
  449. SQLSMALLINT cbInfoValueMax,
  450. SQLSMALLINT *pcbInfoValue);
  451. SQLRETURN SQL_API SQLGetStmtOptionA(
  452. SQLHSTMT hstmt,
  453. SQLUSMALLINT fOption,
  454. SQLPOINTER pvParam);
  455. SQLRETURN SQL_API SQLSetConnectOptionA(
  456. SQLHDBC hdbc,
  457. SQLUSMALLINT fOption,
  458. SQLUINTEGER vParam);
  459. SQLRETURN SQL_API SQLSetStmtOptionA(
  460. SQLHSTMT hstmt,
  461. SQLUSMALLINT fOption,
  462. SQLUINTEGER vParam);
  463. SQLRETURN SQL_API SQLSpecialColumnsA(
  464. SQLHSTMT hstmt,
  465. SQLUSMALLINT fColType,
  466. SQLCHAR *szCatalogName,
  467. SQLSMALLINT cbCatalogName,
  468. SQLCHAR *szSchemaName,
  469. SQLSMALLINT cbSchemaName,
  470. SQLCHAR *szTableName,
  471. SQLSMALLINT cbTableName,
  472. SQLUSMALLINT fScope,
  473. SQLUSMALLINT fNullable);
  474. SQLRETURN SQL_API SQLStatisticsA(
  475. SQLHSTMT hstmt,
  476. SQLCHAR *szCatalogName,
  477. SQLSMALLINT cbCatalogName,
  478. SQLCHAR *szSchemaName,
  479. SQLSMALLINT cbSchemaName,
  480. SQLCHAR *szTableName,
  481. SQLSMALLINT cbTableName,
  482. SQLUSMALLINT fUnique,
  483. SQLUSMALLINT fAccuracy);
  484. SQLRETURN SQL_API SQLTablesA(
  485. SQLHSTMT hstmt,
  486. SQLCHAR *szCatalogName,
  487. SQLSMALLINT cbCatalogName,
  488. SQLCHAR *szSchemaName,
  489. SQLSMALLINT cbSchemaName,
  490. SQLCHAR *szTableName,
  491. SQLSMALLINT cbTableName,
  492. SQLCHAR *szTableType,
  493. SQLSMALLINT cbTableType);
  494. SQLRETURN SQL_API SQLDataSourcesA(
  495. SQLHENV henv,
  496. SQLUSMALLINT fDirection,
  497. SQLCHAR *szDSN,
  498. SQLSMALLINT cbDSNMax,
  499. SQLSMALLINT *pcbDSN,
  500. SQLCHAR *szDescription,
  501. SQLSMALLINT cbDescriptionMax,
  502. SQLSMALLINT *pcbDescription);
  503. SQLRETURN SQL_API SQLDriverConnectA(
  504. SQLHDBC hdbc,
  505. SQLHWND hwnd,
  506. SQLCHAR *szConnStrIn,
  507. SQLSMALLINT cbConnStrIn,
  508. SQLCHAR *szConnStrOut,
  509. SQLSMALLINT cbConnStrOutMax,
  510. SQLSMALLINT *pcbConnStrOut,
  511. SQLUSMALLINT fDriverCompletion);
  512. SQLRETURN SQL_API SQLBrowseConnectA(
  513. SQLHDBC hdbc,
  514. SQLCHAR *szConnStrIn,
  515. SQLSMALLINT cbConnStrIn,
  516. SQLCHAR *szConnStrOut,
  517. SQLSMALLINT cbConnStrOutMax,
  518. SQLSMALLINT *pcbConnStrOut);
  519. SQLRETURN SQL_API SQLColumnPrivilegesA(
  520. SQLHSTMT hstmt,
  521. SQLCHAR *szCatalogName,
  522. SQLSMALLINT cbCatalogName,
  523. SQLCHAR *szSchemaName,
  524. SQLSMALLINT cbSchemaName,
  525. SQLCHAR *szTableName,
  526. SQLSMALLINT cbTableName,
  527. SQLCHAR *szColumnName,
  528. SQLSMALLINT cbColumnName);
  529. SQLRETURN SQL_API SQLDescribeParamA(
  530. SQLHSTMT hstmt,
  531. SQLUSMALLINT ipar,
  532. SQLSMALLINT *pfSqlType,
  533. SQLUINTEGER *pcbParamDef,
  534. SQLSMALLINT *pibScale,
  535. SQLSMALLINT *pfNullable);
  536. SQLRETURN SQL_API SQLForeignKeysA(
  537. SQLHSTMT hstmt,
  538. SQLCHAR *szPkCatalogName,
  539. SQLSMALLINT cbPkCatalogName,
  540. SQLCHAR *szPkSchemaName,
  541. SQLSMALLINT cbPkSchemaName,
  542. SQLCHAR *szPkTableName,
  543. SQLSMALLINT cbPkTableName,
  544. SQLCHAR *szFkCatalogName,
  545. SQLSMALLINT cbFkCatalogName,
  546. SQLCHAR *szFkSchemaName,
  547. SQLSMALLINT cbFkSchemaName,
  548. SQLCHAR *szFkTableName,
  549. SQLSMALLINT cbFkTableName);
  550. SQLRETURN SQL_API SQLNativeSqlA(
  551. SQLHDBC hdbc,
  552. SQLCHAR *szSqlStrIn,
  553. SQLINTEGER cbSqlStrIn,
  554. SQLCHAR *szSqlStr,
  555. SQLINTEGER cbSqlStrMax,
  556. SQLINTEGER *pcbSqlStr);
  557. SQLRETURN SQL_API SQLPrimaryKeysA(
  558. SQLHSTMT hstmt,
  559. SQLCHAR *szCatalogName,
  560. SQLSMALLINT cbCatalogName,
  561. SQLCHAR *szSchemaName,
  562. SQLSMALLINT cbSchemaName,
  563. SQLCHAR *szTableName,
  564. SQLSMALLINT cbTableName);
  565. SQLRETURN SQL_API SQLProcedureColumnsA(
  566. SQLHSTMT hstmt,
  567. SQLCHAR *szCatalogName,
  568. SQLSMALLINT cbCatalogName,
  569. SQLCHAR *szSchemaName,
  570. SQLSMALLINT cbSchemaName,
  571. SQLCHAR *szProcName,
  572. SQLSMALLINT cbProcName,
  573. SQLCHAR *szColumnName,
  574. SQLSMALLINT cbColumnName);
  575. SQLRETURN SQL_API SQLProceduresA(
  576. SQLHSTMT hstmt,
  577. SQLCHAR *szCatalogName,
  578. SQLSMALLINT cbCatalogName,
  579. SQLCHAR *szSchemaName,
  580. SQLSMALLINT cbSchemaName,
  581. SQLCHAR *szProcName,
  582. SQLSMALLINT cbProcName);
  583. SQLRETURN SQL_API SQLTablePrivilegesA(
  584. SQLHSTMT hstmt,
  585. SQLCHAR *szCatalogName,
  586. SQLSMALLINT cbCatalogName,
  587. SQLCHAR *szSchemaName,
  588. SQLSMALLINT cbSchemaName,
  589. SQLCHAR *szTableName,
  590. SQLSMALLINT cbTableName);
  591. SQLRETURN SQL_API SQLDriversA(
  592. SQLHENV henv,
  593. SQLUSMALLINT fDirection,
  594. SQLCHAR *szDriverDesc,
  595. SQLSMALLINT cbDriverDescMax,
  596. SQLSMALLINT *pcbDriverDesc,
  597. SQLCHAR *szDriverAttributes,
  598. SQLSMALLINT cbDrvrAttrMax,
  599. SQLSMALLINT *pcbDrvrAttr);
  600. //---------------------------------------------
  601. // Mapping macros for Unicode
  602. //---------------------------------------------
  603. #ifndef SQL_NOUNICODEMAP // define this to disable the mapping
  604. #ifdef UNICODE
  605. #define SQLColAttribute SQLColAttributeW
  606. #define SQLColAttributes SQLColAttributesW
  607. #define SQLConnect SQLConnectW
  608. #define SQLDescribeCol SQLDescribeColW
  609. #define SQLError SQLErrorW
  610. #define SQLExecDirect SQLExecDirectW
  611. #define SQLGetConnectAttr SQLGetConnectAttrW
  612. #define SQLGetCursorName SQLGetCursorNameW
  613. #define SQLGetDescField SQLGetDescFieldW
  614. #define SQLGetDescRec SQLGetDescRecW
  615. #define SQLGetDiagField SQLGetDiagFieldW
  616. #define SQLGetDiagRec SQLGetDiagRecW
  617. #define SQLPrepare SQLPrepareW
  618. #define SQLSetConnectAttr SQLSetConnectAttrW
  619. #define SQLSetCursorName SQLSetCursorNameW
  620. #define SQLSetDescField SQLSetDescFieldW
  621. #define SQLSetStmtAttr SQLSetStmtAttrW
  622. #define SQLGetStmtAttr SQLGetStmtAttrW
  623. #define SQLColumns SQLColumnsW
  624. #define SQLGetConnectOption SQLGetConnectOptionW
  625. #define SQLGetInfo SQLGetInfoW
  626. #define SQLGetTypeInfo SQLGetTypeInfoW
  627. #define SQLSetConnectOption SQLSetConnectOptionW
  628. #define SQLSpecialColumns SQLSpecialColumnsW
  629. #define SQLStatistics SQLStatisticsW
  630. #define SQLTables SQLTablesW
  631. #define SQLDataSources SQLDataSourcesW
  632. #define SQLDriverConnect SQLDriverConnectW
  633. #define SQLBrowseConnect SQLBrowseConnectW
  634. #define SQLColumnPrivileges SQLColumnPrivilegesW
  635. #define SQLForeignKeys SQLForeignKeysW
  636. #define SQLNativeSql SQLNativeSqlW
  637. #define SQLPrimaryKeys SQLPrimaryKeysW
  638. #define SQLProcedureColumns SQLProcedureColumnsW
  639. #define SQLProcedures SQLProceduresW
  640. #define SQLTablePrivileges SQLTablePrivilegesW
  641. #define SQLDrivers SQLDriversW
  642. #endif /* UNICODE */
  643. #endif /* SQL_NOUNICODEMAP */
  644. #endif /* RC_INVOKED */
  645. #ifdef __cplusplus
  646. } /* End of extern "C" { */
  647. #endif /* __cplusplus */
  648. #endif /* #ifndef __SQLUCODE */