Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

817 lines
23 KiB

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