asiconst.h 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. //
  11. // Name: asiconst.h ast_asi_inc_appl_asiconst_h
  12. //
  13. // Description: Header file for AutoCAD SQL Interface.
  14. // Constant definitions
  15. #ifndef ASI_ASICONST_H
  16. #define ASI_ASICONST_H asiconsth
  17. /* ///////////////////////////////////////////////////////////////////////// */
  18. /* */
  19. /* SPECIAL DEFINES FOR FUNCTION PROTOTYPES */
  20. /* */
  21. /* ///////////////////////////////////////////////////////////////////////// */
  22. #ifdef _
  23. #undef _
  24. #endif /* _ */
  25. #ifdef PROTOTYPES
  26. #define _(x) x
  27. #else /* PROTOTYPES not allowed */
  28. #define _(x) ()
  29. #endif /* PROTOTYPES */
  30. #if defined(__cplusplus)
  31. extern "C" {
  32. #endif /* __cplusplus */
  33. /* ///////////////////////////////////////////////////////////////////////// */
  34. /* */
  35. /* DEFINES */
  36. /* */
  37. /* ///////////////////////////////////////////////////////////////////////// */
  38. #define ASI_MAX(x,y) ((x)>(y)?(x):(y))
  39. #define ASI_MIN(x,y) ((x)<(y)?(x):(y))
  40. #include "csptypes.h"
  41. #pragma pack (push, 8)
  42. /* ///////////////////////////////////////////////////////////////////////// */
  43. /* */
  44. /* TYPEDEFS */
  45. /* */
  46. /* ///////////////////////////////////////////////////////////////////////// */
  47. typedef unsigned char uchar; /* Unsigned char */
  48. #if !defined(hpux) || !defined(_SYS_TYPES_INCLUDED)
  49. typedef unsigned short ushort; /* Unsigned short */
  50. typedef unsigned int uint; /* Unsigned int */
  51. #endif /* !hpux || !_SYS_TYPES_INCLUDED */
  52. typedef unsigned long ulong; /* Unsigned long */
  53. typedef double real; /* Real */
  54. typedef long integer; /* Integer */
  55. typedef short smallint; /* Small integer */
  56. /* Interval data */
  57. typedef struct asi_year {
  58. long sign; /* kAsiTrue if negative */
  59. ulong years; /* Years */
  60. } ASI_IYEAR;
  61. typedef struct asi_yeartomonth {
  62. long sign; /* kAsiTrue if negative */
  63. ulong years; /* Years */
  64. ulong months; /* Months (0-11) */
  65. } ASI_IYEARTOMONTH;
  66. typedef struct asi_month {
  67. long sign; /* kAsiTrue if negative */
  68. ulong months; /* Months */
  69. } ASI_IMONTH;
  70. typedef struct asi_day {
  71. long sign; /* kAsiTrue if negative */
  72. ulong days; /* Days */
  73. } ASI_IDAY;
  74. typedef struct asi_daytohour {
  75. long sign; /* kAsiTrue if negative */
  76. ulong days; /* Days */
  77. ulong hours; /* Hours (0-23) */
  78. } ASI_IDAYTOHOUR;
  79. typedef struct asi_daytominute {
  80. long sign; /* kAsiTrue if negative */
  81. ulong days; /* Days */
  82. ulong hours; /* Hours (0-23) */
  83. ulong minutes; /* Minutes (0-59) */
  84. } ASI_IDAYTOMINUTE;
  85. typedef struct asi_daytosecond {
  86. double seconds; /* Seconds (0-59.99..9) */
  87. long sign; /* kAsiTrue if negative */
  88. ulong days; /* Days */
  89. ulong hours; /* Hours (0-23) */
  90. ulong minutes; /* Minutes (0-59) */
  91. } ASI_IDAYTOSECOND;
  92. typedef struct asi_hour {
  93. long sign; /* kAsiTrue if negative */
  94. ulong hours; /* Hours */
  95. } ASI_IHOUR;
  96. typedef struct asi_hourtominute {
  97. long sign; /* kAsiTrue if negative */
  98. ulong hours; /* Hours */
  99. ulong minutes; /* Minutes (0-59) */
  100. } ASI_IHOURTOMINUTE;
  101. typedef struct asi_hourtosecond {
  102. double seconds; /* Seconds (0-59.99..9) */
  103. long sign; /* kAsiTrue if negative */
  104. ulong hours; /* Hours */
  105. ulong minutes; /* Minutes (0-59) */
  106. } ASI_IHOURTOSECOND;
  107. typedef struct asi_minute {
  108. long sign; /* kAsiTrue if negative */
  109. ulong minutes; /* Minutes */
  110. } ASI_IMINUTE;
  111. typedef struct asi_minuteitosecond {
  112. double seconds; /* Seconds (0-59.99..9) */
  113. long sign; /* kAsiTrue if negative */
  114. ulong minutes; /* Minutes */
  115. } ASI_IMINUTETOSECOND;
  116. typedef struct asi_second {
  117. double seconds; /* Seconds */
  118. long sign; /* kAsiTrue if negative */
  119. } ASI_ISECOND;
  120. /* Datetime data */
  121. /* */
  122. typedef struct asi_date { /* Date */
  123. ushort year; /* Year */
  124. ushort month; /* Month (0-11) */
  125. ushort day; /* Day (0-31) */
  126. short pad; /* pad short */
  127. } ASI_DTDATE;
  128. typedef struct asi_time { /* Time with time zone */
  129. double second; /* Second (0-59.99..9) */
  130. ASI_IHOURTOMINUTE timezone; /* time zone */
  131. ushort hour; /* Hour (0-23) */
  132. ushort minute; /* Minute (0-59) */
  133. } ASI_DTTIME;
  134. typedef struct asi_timestamp { /* Timestamp with time zone */
  135. ASI_DTTIME time; /* Time */
  136. ASI_DTDATE date; /* Date */
  137. } ASI_DTTIMESTAMP;
  138. /* */
  139. typedef enum {
  140. kAsiUnknown = -1, /* Boolean value is undefined */
  141. kAsiFalse = 0,
  142. kAsiTrue = 1,
  143. kAsiBad = 0,
  144. kAsiGood = 1
  145. } EAsiBoolean;
  146. #define EAsiFlag EAsiBoolean
  147. /* SQL data types */
  148. typedef enum {
  149. kAsiVector = -2, /* Row */
  150. kAsiImplDefined = -1, /* Implementation-defined data type */
  151. kAsiTUnknown = 0,
  152. kAsiChar = 1,
  153. kAsiNumeric,
  154. kAsiDecimal,
  155. kAsiInteger,
  156. kAsiSmallInt,
  157. kAsiFloat,
  158. kAsiReal,
  159. kAsiDouble,
  160. kAsiDateTime,
  161. kAsiInterval,
  162. kAsiCharVar = 12,
  163. kAsiBit = 14,
  164. kAsiBitVar,
  165. kAsiPoint, /* n-dimentional point */
  166. kAsiBlob
  167. } EAsiDataType;
  168. /* Date time types */
  169. typedef enum {
  170. kAsiDTUnknown = 0,
  171. kAsiDate = 1,
  172. kAsiTime,
  173. kAsiTimeStamp,
  174. kAsiTimeTZ,
  175. kAsiTimeStampTZ
  176. } EAsiDTType;
  177. /* Interval types */
  178. typedef enum {
  179. kAsiIUnknown = 0,
  180. kAsiYear = 1,
  181. kAsiMonth,
  182. kAsiDay,
  183. kAsiHour,
  184. kAsiMinute,
  185. kAsiSecond,
  186. kAsiYear2Month,
  187. kAsiDay2Hour,
  188. kAsiDay2Minute,
  189. kAsiDay2Second,
  190. kAsiHour2Minute,
  191. kAsiHour2Second,
  192. kAsiMinute2Second
  193. } EAsiIType;
  194. typedef unsigned int uint;
  195. /* //////////////////////////////////////////////////////////// */
  196. /* */
  197. /* Trim specification */
  198. /* */
  199. typedef enum {
  200. kAsiLeading = 0,
  201. kAsiTrailing,
  202. kAsiBoth
  203. } EAsiTrimSpec;
  204. /* Host variable type */
  205. /* */
  206. typedef enum {
  207. kAsiHnull = 0, /* Type undefined */
  208. kAsiHshort = 1, /* short int */
  209. kAsiHlong, /* long int */
  210. kAsiHfloat, /* float */
  211. kAsiHreal, /* double */
  212. kAsiHchar, /* null terminated character string */
  213. kAsiHunicode, /* unicode string (wide characters string) */
  214. kAsiHbinary, /* binary buffer */
  215. kAsiHdate, /* date (ASI_DTDATE) */
  216. kAsiHtime, /* time (ASI_DTTIME) */
  217. kAsiHtimestamp, /* timestamp (ASI_DTTIMESTAMP) */
  218. kAsiHyear, /* Year (ASI_IYEAR) */
  219. kAsiHyeartomonth, /* Year to Month (ASI_IYEARTOMONTH) */
  220. kAsiHmonth, /* Month (ASI_IMONTH) */
  221. kAsiHday, /* Day (ASI_IDAY) */
  222. kAsiHdaytohour, /* Day to hour (ASI_IDAYTOHOUR) */
  223. kAsiHdaytominute, /* Day to minute (ASI_IDAYTOMINUTE) */
  224. kAsiHdaytosecond, /* Day to second (ASI_IDAYTOSECOND) */
  225. kAsiHhour, /* Hour (ASI_IHOUR) */
  226. kAsiHhourtominute, /* Hour to minute (ASI_IHOURTOMINUTE) */
  227. kAsiHhourtosecond, /* Hour to second (ASI_IHOURTOSECOND) */
  228. kAsiHminute, /* Minute (ASI_IMINUTE) */
  229. kAsiHminutetosecond, /* Minute to second (ASI_IMINUTETOSECOND) */
  230. kAsiHsecond /* Second (ASI_ISECOND) */
  231. } EAsiHostType;
  232. /* */
  233. /* EAsiDrvStatus, EAsiSIDataType, and EAsiSITransactionType */
  234. /* sepecify features and capabilities that connection supports. */
  235. /* They can be retrieved by means of CAsiSQLObject::GetStatus function */
  236. /* */
  237. /* Supported general features codes */
  238. /* */
  239. typedef enum {
  240. kAsiStatUsername = (int)0x00000001 /* User name */
  241. ,kAsiStatPassword = (int)0x00000002 /* Password */
  242. ,kAsiStatCatalog = (int)0x00000004 /* Catalog feature */
  243. ,kAsiStatSchema = (int)0x00000008 /* Schema feature */
  244. ,kAsiStatTimeZone = (int)0x00000010 /* Time zone */
  245. ,kAsiStatNames = (int)0x00000020 /* Character set names */
  246. ,kAsiStatTranslation = (int)0x00000040 /* Translations */
  247. ,kAsiStatInfoSchema = (int)0x00000080 /* Information schema facility */
  248. ,kAsiStatCDCatalog = (int)0x00000100 /* Catalog definition/drop catalog */
  249. ,kAsiStatCDSchema = (int)0x00000200 /* Schema definition/drop schema */
  250. ,kAsiStatCDTable = (int)0x00000400 /* Table definition/drop table */
  251. ,kAsiStatCDView = (int)0x00000800 /* View definition/drop view */
  252. ,kAsiStatCDIndex = (int)0x00001000 /* Index definition/drop index */
  253. ,kAsiStatCDTranslation = (int)0x00002000 /* Translation definition/drop translation */
  254. ,kAsiStatCDAssertion = (int)0x00004000 /* Create assertion/drop assertion */
  255. ,kAsiStatCDCharset = (int)0x00008000 /* Character set definition/drop character set */
  256. ,kAsiStatCDCollation = (int)0x00010000 /* Collation definition/drop collation */
  257. ,kAsiStatCDDomain = (int)0x00020000 /* Domain definition/drop domain */
  258. ,kAsiStatADomain = (int)0x00040000 /* Alter domain */
  259. ,kAsiStatATable = (int)0x00080000 /* Alter table */
  260. ,kAsiStatPrivileges = (int)0x00100000 /* Grant/revoke privileges */
  261. ,kAsiStatCommitRollback = (int)0x00200000 /* Commit work/Rollback work */
  262. ,kAsiStatSetTrans = (int)0x00400000 /* Set transaction */
  263. ,kAsiStatSetConstr = (int)0x00800000 /* Set constraint */
  264. ,kAsiStatCursor = (int)0x01000000 /* Cursor manipulation (open, close, fetch next) */
  265. ,kAsiStatFetch = (int)0x02000000 /* Fetches Prior, First, Last, Absolute, Relative */
  266. ,kAsiStatSingSelect = (int)0x04000000 /* Select statement: single row */
  267. ,kAsiStatDeletePos = (int)0x08000000 /* Delete: positioned */
  268. ,kAsiStatUpdatePos = (int)0x10000000 /* Update: positioned */
  269. ,kAsiStatDeleteSearch = (int)0x20000000 /* Delete: searched */
  270. ,kAsiStatUpdateSearch = (int)0x40000000 /* Update: searched */
  271. ,kAsiStatInsert = (int)0x80000000 /* Insert */
  272. } EAsiDrvStatus;
  273. /* Supported data type */
  274. typedef enum {
  275. kAsiSDImplDefined = (int)0x00000001,
  276. kAsiSDChar = (int)0x00000002,
  277. kAsiSDNumeric = (int)0x00000004,
  278. kAsiSDDecimal = (int)0x00000008,
  279. kAsiSDInteger = (int)0x00000010,
  280. kAsiSDSmallInt = (int)0x00000020,
  281. kAsiSDFloat = (int)0x00000040,
  282. kAsiSDReal = (int)0x00000080,
  283. kAsiSDDouble = (int)0x00000100,
  284. kAsiSDDate = (int)0x00000200,
  285. kAsiSDTime = (int)0x00000400,
  286. kAsiSDTimeTZ = (int)0x00000800,
  287. kAsiSDTimestamp = (int)0x00001000,
  288. kAsiSDTimestampTZ = (int)0x00002000,
  289. kAsiSDYM = (int)0x00004000,
  290. kAsiSDDT = (int)0x00008000,
  291. kAsiSDCharVar = (int)0x00010000,
  292. kAsiSDBit = (int)0x00020000,
  293. kAsiSDBitVar = (int)0x00040000,
  294. kAsiSDBLOB = (int)0x00080000,
  295. kAsiSDCharAsStr = (int)0x00100000 // provider may use STR rather that WSTR to
  296. // accept char input paramters
  297. } EAsiSIDataType;
  298. /* Supported transaction types */
  299. typedef enum {
  300. kAsiTSUndefined = (int )0, /* Undefined */
  301. /* Read/Write, Read Uncommitted is not possible */
  302. kAsiTSRWRC = (int)0x00000001, /* Read/Write, Read Committed */
  303. kAsiTSRWRR = (int)0x00000002, /* Read/Write, Repeatable Read */
  304. kAsiTSRWSR = (int)0x00000004, /* Read/Write, Serializable */
  305. kAsiTSRORU = (int)0x00000008, /* Read Only, Read Uncommitted */
  306. kAsiTSRORC = (int)0x00000010, /* Read Only, Read Committed */
  307. kAsiTSRORR = (int)0x00000020, /* Read Only, Repeatable Read */
  308. kAsiTSROSR = (int)0x00000040 /* Read Only, Serializable */
  309. } EAsiSITransactionType;
  310. /* Driver features, capabilities and status codes */
  311. typedef enum {
  312. kAsiSISupportedFeatures /* Supported base features codes (EAsiDrvStatus) */
  313. ,kAsiSITransaction /* Transaction state (EAsiBoolean) */
  314. ,kAsiSICsrState /* Open/Close cursor (EAsiBoolean) */
  315. ,kAsiSICsrSns /* Sensitive/insensitive cursor (EAsiBoolean) */
  316. ,kAsiSICsrScr /* Scroll/non scroll cursor (EAsiBoolean) */
  317. ,kAsiSICsrPos /* Cursor position (long) */
  318. ,kAsiSICsrUpd /* Cursor updatability (EAsiBoolean) */
  319. ,kAsiSIDataType /* Supported data types (EAsiSIDataType) */
  320. ,kAsiSIBindDataType /* Supported bind data types (EAsiSIDataType) */
  321. ,kAsiSITransactionType /* Supported types of tranactions (EAsiSITransactionType) */
  322. } EAsiStatInfo;
  323. #ifdef A
  324. /* SQL statement types */
  325. /* */
  326. typedef enum {
  327. kAsiTYPE_UNDEFINED = 0, /* undefined */
  328. kAsiALLOC_CURSOR, /* allocate cursor */
  329. kAsiALLOC_STATEMENT, /* allocate statement */
  330. kAsiALTER_DOMAIN, /* alter domain */
  331. kAsiALTER_TABLE, /* alter table */
  332. kAsiCREATE_ASSERTION, /* assertion definition */
  333. kAsiCREATE_CATALOG, /* create catalog */
  334. kAsiCREATE_CHARACTER_SET, /* character set definition */
  335. kAsiCREATE_COLLATION, /* collation definition */
  336. kAsiCREATE_DOMAIN, /* domain definition */
  337. kAsiCLOSE_CURSOR, /* close cursor */
  338. kAsiCOMMIT, /* commit work */
  339. kAsiCONNECT, /* connect */
  340. kAsiCREATE_SCHEMA, /* schema definition */
  341. kAsiCREATE_TABLE, /* table definition */
  342. kAsiCREATE_VIEW, /* view definition */
  343. kAsiCREATE_INDEX, /* index definition */
  344. kAsiCREATE_TRANSLATION, /* translation definition */
  345. kAsiCURSOR, /* cursor specification */
  346. kAsiDELETE_CURSOR, /* delete positioned */
  347. kAsiDELETE_WHERE, /* delete searched */
  348. kAsiDEALLOCATE_STATEMENT, /* deallocate statement */
  349. kAsiDISCONNECT, /* disconnect */
  350. kAsiDROP_ASSERTION, /* drop assertion */
  351. kAsiDROP_CATALOG, /* drop catalog */
  352. kAsiDROP_CHARACTER_SET, /* drop character set */
  353. kAsiDROP_COLLATION, /* drop collation */
  354. kAsiDROP_DOMAIN, /* drop domain */
  355. kAsiDROP_SCHEMA, /* drop schema */
  356. kAsiDROP_TABLE, /* drop table */
  357. kAsiDROP_TRANSLATION, /* drop translation */
  358. kAsiDROP_VIEW, /* drop view */
  359. kAsiDROP_INDEX, /* drop index */
  360. kAsiEXECUTE_IMMEDIATE, /* immediate execute */
  361. kAsiEXECUTE, /* execute */
  362. kAsiFETCH, /* fetch */
  363. kAsiGRANT, /* grant privileges */
  364. kAsiINSERT, /* insert */
  365. kAsiOPEN, /* open cursor */
  366. kAsiPREPARE, /* prepare */
  367. kAsiREVOKE, /* revoke privileges */
  368. kAsiROLLBACK, /* rollback work */
  369. kAsiSELECT, /* select statement: single row */
  370. kAsiSET_CATALOG, /* set catalog */
  371. kAsiSET_SCHEMA, /* set schema */
  372. kAsiSET_TIME_ZONE, /* set time zone */
  373. kAsiSET_NAMES, /* set names */
  374. kAsiSET_TRANSACTION, /* set transaction */
  375. kAsiSET_CONSTRAINT, /* set constraint mode */
  376. kAsiSET_AUTHORIZATION, /* set authorization identifier */
  377. kAsiUPDATE_CURSOR, /* update: positioned */
  378. kAsiUPDATE_WHERE /* update: searched */
  379. } EAsiStatement;
  380. #endif
  381. /* Transaction isolation level */
  382. typedef enum {
  383. kAsiTIUndefined = 0,
  384. kAsiReadUncommitted = 1,
  385. kAsiReadCommitted,
  386. kAsiRepeatableRead,
  387. kAsiSerializable
  388. } EAsiTILevel;
  389. /* Transaction mode */
  390. typedef enum {
  391. kAsiTMUndefined = 0,
  392. kAsiTReadOnly = 1,
  393. kAsiTReadWrite
  394. } EAsiTMode;
  395. /* default diagnostics size */
  396. #define DefaultDiagSize 32
  397. /* Defer or immediate constriant checking */
  398. typedef enum {
  399. kAsiCDefer = 1,
  400. kAsiCImmediate
  401. } EAsiConstrCheck;
  402. /* Cursor scrollability */
  403. typedef enum {
  404. kAsiNonScroll = 0,
  405. kAsiScroll = 1
  406. } EAsiCurScr;
  407. /* Cursor Sensitivity */
  408. typedef enum {
  409. kAsiSnsUndef = 0, /* Cursor sensitivity is undefined */
  410. kAsiInsensitive = 1
  411. } EAsiCurSns;
  412. /* Fetch direction */
  413. typedef enum {
  414. kAsiNext = 1,
  415. kAsiPrior,
  416. kAsiFirst,
  417. kAsiLast,
  418. kAsiAbsolute,
  419. kAsiRelative
  420. } EAsiDirection;
  421. /* Cursor position */
  422. /* */
  423. typedef enum {
  424. kAsiCPUnknown = 0, /* Position unknown */
  425. kAsiTos = 1, /* Before the first row */
  426. kAsiEos = 2, /* After the last row */
  427. kAsiBnr = 3, /* Before row (on deleted row) */
  428. kAsiOcr = 4 /* Current row */
  429. } EAsiCurPos;
  430. /* Coercibility attributes */
  431. /* */
  432. typedef enum {
  433. kAsiCACoercible = 0, /* Coercible */
  434. kAsiCAImplicit = 1, /* Implicit */
  435. kAsiNoCollation = 2, /* No collating sequence */
  436. kAsiCAExplicit = 3 /* Explicit */
  437. } EAsiCAttr;
  438. /* Information schema tables */
  439. typedef enum {
  440. kAsiISUnknown = 0
  441. // Logical tables
  442. ,kAsiIS_ASSERTIONS = 1
  443. ,kAsiIS_CHARACTER_SETS = 2
  444. ,kAsiIS_CHECK_CONSTRAINTS = 3
  445. ,kAsiIS_COLLATIONS = 4
  446. ,kAsiIS_COLUMN_DOMAIN_USAGE = 5
  447. ,kAsiIS_COLUMN_PRIVILEGES = 6
  448. ,kAsiIS_COLUMNS = 7
  449. ,kAsiIS_CONSTRAINT_COLUMN_USAGE = 8
  450. ,kAsiIS_CONSTRAINT_TABLE_USAGE = 9
  451. ,kAsiIS_FOREIGN_KEYS = 10
  452. ,kAsiIS_KEY_COLUMN_USAGE = 11
  453. ,kAsiIS_PRIMARY_KEYS = 12
  454. ,kAsiIS_PROCEDURE_COLUMNS = 13
  455. ,kAsiIS_PROCEDURE_PARAMETERS = 14
  456. ,kAsiIS_PROCEDURES = 15
  457. ,kAsiIS_REFERENTIAL_CONSTRAINTS = 16
  458. ,kAsiIS_SCHEMATA = 17
  459. ,kAsiIS_SQL_LANGUAGES = 18
  460. ,kAsiIS_TABLE_CONSTRAINTS = 19
  461. ,kAsiIS_TABLE_PRIVILEGES = 20
  462. ,kAsiIS_TABLES = 21
  463. ,kAsiIS_TRANSLATIONS = 22
  464. ,kAsiIS_USAGE_PRIVILEGES = 23
  465. ,kAsiIS_VIEW_COLUMN_USAGE = 24
  466. ,kAsiIS_VIEW_TABLE_USAGE = 25
  467. ,kAsiIS_VIEWS = 26
  468. // Physical
  469. ,kAsiIS_CATALOGS = 27
  470. ,kAsiIS_INDEXES = 28
  471. ,kAsiIS_PROVIDER_TYPES = 29
  472. ,kAsiIS_STATISTICS = 30
  473. } EAsiInfSchTab;
  474. /* Datasource type */
  475. typedef enum {
  476. kAsiDSSOURCETYPE_BOTH = 0,
  477. kAsiDSSOURCETYPE_DATASOURCE = 1,
  478. kAsiDSSOURCETYPE_ENUMERATOR = 2
  479. } EAsiDataSourceType;
  480. /* //////////////////////////////////////////////////////////////// */
  481. /* */
  482. /* Default, minimal and maximal setting for ASI data */
  483. /* */
  484. #define MaxCharLength 256
  485. #define DefaultCharLength 1
  486. #define MaxBinaryLength (256*8)
  487. #define DefaultBinaryLength 1
  488. #define SmallIntPrecision 6
  489. #define IntegerPrecision 10
  490. #define MaxNumericPrecision 32
  491. #define MaxNumericScale MaxNumericPrecision
  492. #define DefaultNumericPrecision 18
  493. #define DefaultNumericScale 0
  494. #define MaxDecimalPrecision 32
  495. #define MaxDecimalScale MaxDecimalPrecision
  496. #define DefaultDecimalPrecision 18
  497. #define DefaultDecimalScale 0
  498. #define MaxFloatPrecision 32
  499. #define DefaultFloatPrecision 16
  500. #define RealPrecision 32
  501. #define DoublePrecision 64
  502. #define MaxLeadingFieldPrec 6 /* Interval */
  503. #define MaxFracSecondPrec 8
  504. #define MinLeadingFieldPrec 2
  505. #define MinFracSecondPrec 0
  506. #define DefaultLeadingFieldPrec 4
  507. #define DefaultFracSecondPrec 0
  508. #define MaxTimePrecision 6
  509. #define DefaultTimePrecision 0
  510. #define MaxTimeStampPrecision 6
  511. #define DefaultTimeStampPrecision 6
  512. #define MaxIdentLength 256
  513. #define DefaultPointDimension 3
  514. /* //////////////////////////////////////////////////////////////// */
  515. /* */
  516. /* Implementation defined data definition */
  517. /* */
  518. #define AsiImplDefFxdMin 0000 /* 0000 - 1999 reserved for ASI */
  519. #define AsiImplDefFxdUser 2000 /* 2000 - 3999 avail for User */
  520. #define AsiImplDefFxdMax 3999
  521. #define AsiImplDefRawMin 4000 /* 4000 - 5999 reserved for ASI */
  522. #define AsiImplDefRawUser 6000 /* 6000 - 8000 avail for User */
  523. #define AsiImplDefRawMax 8000
  524. /* //////////////////////////////////////////////////////////////////// */
  525. /* */
  526. /* Condition information item names */
  527. /* */
  528. typedef enum { /* Type of data in buffer */
  529. kAsiConditionNumber = 1, /* Integer */
  530. kAsiMessageLength, /* Integer */
  531. kAsiMessageOctetLength, /* Integer */
  532. kAsiHRESULT = 4,/* HRESULT */
  533. kAsiConditionStrings = 20,
  534. kAsiReturnedSQLSTATE, /* Char */
  535. kAsiClassOrigin, /* Char */
  536. kAsiSubClassOrigin, /* Char */
  537. kAsiServerName, /* Char */
  538. kAsiConnectionName, /* Char */
  539. kAsiConstraintCatalog, /* Char */
  540. kAsiConstraintSchema, /* Char */
  541. kAsiConstraintName, /* Char */
  542. kAsiCatalogName, /* Char */
  543. kAsiSchemaName, /* Char */
  544. kAsiTableName, /* Char */
  545. kAsiColumnName, /* Char */
  546. kAsiCursorName, /* Char */
  547. kAsiMessageText, /* Char */
  548. kAsiInterface = 35 /*IID*/
  549. } EAsiDiag;
  550. typedef unsigned int AsiDiag;
  551. #define MinUserDefDiagParam 0x0400
  552. /* //////////////////////////////////////////////////////////////////// */
  553. /* */
  554. /* Exception conditions used in ASI. */
  555. /* */
  556. typedef enum {
  557. kAsiErrUndefined = -1
  558. ,kAsiNoError = 0 /* Successful completion */
  559. ,kAsiOKAY = 0
  560. /* The following error codes are for standard SQLSTATE values */
  561. /* */
  562. ,kAsiSQLWARN = 0x0100 /* warning */
  563. ,kAsiSQLWARNCUROP /* cursor operation conflict */
  564. ,kAsiSQLWARNDISC /* disconnect error */
  565. ,kAsiSQLNULLSET /* null value eliminated in set function */
  566. ,kAsiSQLWARNRTRUNC /* string data, right truncation */
  567. ,kAsiSQLWARNINSUFDESC /* insufficient item descriptor areas */
  568. ,kAsiSQLWARNREVOKE /* privilege not revoked */
  569. ,kAsiSQLWARNGRANT /* privilege not granted */
  570. ,kAsiSQLWARNBITPAD /* implicit zero-bit padding */
  571. ,kAsiSQLWARNLONGCOND /* search condition too long for information schema */
  572. ,kAsiSQLWARNLONGEXPR /* query expression too long for information schema */
  573. ,kAsiSQLNODATA = 0x0200 /* no data */
  574. ,kAsiSQLNDSearchStm /* rows were not modified by searched statement */
  575. ,kAsiSQLNDSingSelect /* row doesn't match single select */
  576. ,kAsiSQLNDEOS /* fetch: end of selection set */
  577. ,kAsiSQLNDTOS /* fetch: top of selection set */
  578. ,kAsiSQLDYN = 0x0700 /* dynamic SQL error */
  579. ,kAsiSQLDYNUPMISMATCH /* using clause does not match dynamic parameter specification */
  580. ,kAsiSQLDYNUTMISMATCH /* using clause does not match target specification */
  581. ,kAsiSQLDYNEXECUR /* cursor specification cannot be executed */
  582. ,kAsiSQLDYNUSINGMIS /* using clause required for dynamic parameter */
  583. ,kAsiSQLDYNNOTCURSOR /* prepared statement not a cursor specification */
  584. ,kAsiSQLDYNAVIOLATION /* restricted data type attribute violation */
  585. ,kAsiSQLDYNINTOMIS /* using clause required for result fields */
  586. ,kAsiSQLDYNINVDSCCOUN /* invalid descriptor count */
  587. ,kAsiSQLDYNINVDSCIDX /* invalid descriptor index */
  588. ,kAsiSQLDYNNOTPREPARED /* statement was not prepared */
  589. ,kAsiSQLDYNAlreadyBound /* columns were already bound with host buffers */
  590. ,kAsiSQLCON = 0x0800 /* connection exception */
  591. ,kAsiSQLCONCLIENT /* SQL-client unable to establish SQL- connection */
  592. ,kAsiSQLCONNAMEUSE /* connection name in use */
  593. ,kAsiSQLCONNOTEXIST /* connection does not exist */
  594. ,kAsiSQLCONSERVER /* SQL-server rejected establishment of SQL-connection */
  595. ,kAsiSQLCONOPENOBJS /* open objects associated with session */
  596. ,kAsiSQLCONFAILURE /* connection failure */
  597. ,kAsiSQLCONTRANS /* transaction resolution unknown */
  598. ,kAsiSQLCURCONFLICT = 0x0900 /* cursor operation conflict */
  599. ,kAsiSQLNOTSUPPORTED = 0x0A00 /* feature not supported */
  600. ,kAsiSQLMULTRANS /* multiple environment transaction */
  601. ,kAsiSQLCARVIOLATION = 0x2100 /* cardinality violation */
  602. ,kAsiSQLDATA = 0x2200 /* data exception */
  603. ,kAsiSQLDATASRTRUN /* string data, right truncation */
  604. ,kAsiSQLDATANOIND /* null value, no indicator parameter */
  605. ,kAsiSQLDATANUMRANGE /* numeric value out of range */
  606. ,kAsiSQLDATANUMTRUNC /* decimal fractional part was rounded */
  607. ,kAsiSQLDATAASSIGN /* error in assignment */
  608. ,kAsiSQLDATAFETSEQ /* invalid fetch sequence */
  609. ,kAsiSQLDATADTFORMAT /* invalid datetime format */
  610. ,kAsiSQLDATADTOVF /* datetime field overflow */
  611. ,kAsiSQLDATATZDISP /* invalid time zone displacement value */
  612. ,kAsiSQLDATA10 /* Undefined */
  613. ,kAsiSQLDATASUBSTRERR /* substring error */
  614. ,kAsiSQLDATAZERODIV /* division by zero */
  615. ,kAsiSQLDATA13 /* Undefined */
  616. ,kAsiSQLDATAINFORMAT /* invalid interval format (ASI extra) */
  617. ,kAsiSQLINTEROVF /* interval field overflow */
  618. ,kAsiSQLColRO /* column is read only */
  619. ,kAsiSQLDATA17 /* Undefined */
  620. ,kAsiSQLDATACHARCAST /* invalid character value for cast */
  621. ,kAsiSQLDATAESCCHAR /* invalid escape character */
  622. ,kAsiSQLDATA20 /* Undefined */
  623. ,kAsiSQLDATACHAR /* character not in repertoire */
  624. ,kAsiSQLDATAINDIVF /* indicator overflow */
  625. ,kAsiSQLDATAPARVAL /* invalid parameter value */
  626. ,kAsiSQLDATACSTR /* unterminated C string */
  627. ,kAsiSQLDATAESCSEQ /* invalid escape sequence */
  628. ,kAsiSQLDATASTRLEN /* string data, length mismatch */
  629. ,kAsiSQLDATATRIMERR /* trim error */
  630. ,kAsiSQLDATADTUNDF /* datetime field underflow */
  631. ,kAsiSQLINTCONSTR = 0x2300 /* integrity constraint violation */
  632. ,kAsiSQLINVCURSTATE = 0x2400 /* invalid cursor state */
  633. ,kAsiSQLICSDeallocStm = 0x2401 /* deallocate statement associated with open cursor */
  634. ,kAsiSQLICSClose = 0x2402 /* cursor is in close state */
  635. ,kAsiSQLICSNotScroll = 0x2403 /* can only fetch next in non-scroll cursor */
  636. ,kAsiSQLICSReadOnly = 0x2404 /* cursor is read only */
  637. ,kAsiSQLICSNoCurRow = 0x2405 /* cursor is not positioned on row */
  638. ,kAsiSQLICSOpen = 0x2406 /* cursor is in open state */
  639. ,kAsiSQLINVTRSTATE = 0x2500 /* invalid transaction state */
  640. ,kAsiSQLITSActive = 0x2501 /* disconnect while transaction is active */
  641. ,kAsiSQLITSNotActive = 0x2502 /* transaction is in-active */
  642. ,kAsiSQLITSSetTrans = 0x2503 /* set transaction (transaction is active) */
  643. ,kAsiSQLINVTSTabRO = 0x2504 /* Table is read only */
  644. ,kAsiSQLINVTSTrsRO = 0x2505 /* Transaction is read only */
  645. ,kAsiSQLINVTSAuth = 0x2506 /* Set authorization id but transaction is active */
  646. ,kAsiSQLINVSTMNAME = 0x2600 /* invalid SQL statement name */
  647. ,kAsiSQLTRIGCHNVIOL = 0x2700 /* triggered data change violation */
  648. ,kAsiSQLINVAUTHID = 0x2800 /* invalid authorization specification */
  649. ,kAsiSQLDIRSYNACS = 0x2A00 /* syntax error or access rule violation in direct SQL statement */
  650. ,kAsiSQLPRIVEXIST = 0x2B00 /* dependent privilege descriptor still exist */
  651. ,kAsiSQLINVCHARSET = 0x2C00 /* invalid character set name */
  652. ,kAsiSQLINVTRTERM = 0x2D00 /* invalid transaction termination */
  653. ,kAsiSQLINVDESC = 0x3300 /* invalid SQL descriptor name */
  654. ,kAsiSQLINVCURNAME = 0x3400 /* invalid cursor name */
  655. ,kAsiSQLINVCONDNUM = 0x3500 /* invalid condition number */
  656. ,kAsiSQLDYNSYNACS = 0x3700 /* syntax error or access rule violation in dynamic SQL statement */
  657. /* ASI syntax errors */
  658. ,kAsiErSynWrStr /* Wrong string format */
  659. ,kAsiErSynLongStr /* String is too long (character, binary) */
  660. ,kAsiErSynMisQuot /* Missing right quotas */
  661. ,kAsiErSynHexDigit /* Wrong Hexadecimal digit */
  662. ,kAsiErSynBinDigit /* Wrong Binary digit */
  663. ,kAsiErSynInterval /* Wrong interval string */
  664. ,kAsiErSynTypeMatch /* Data types mismatch */
  665. ,kAsiErSynCollate /* Invalid collate clause */
  666. ,kAsiErSynWrTimeZone /* Misleading time zone specification */
  667. ,kAsiErSynMisZone /* Missing ZONE keyword */
  668. ,kAsiErSynNotTimeZone /* Not a time zone interval */
  669. ,kAsiErSynUnbalPar /* Unbalance parenthesis */
  670. ,kAsiErSynExprEx /* Expression expected */
  671. ,kAsiErSynMisCol /* Missing column specification */
  672. ,kAsiErSynWrColSpec /* Wrong column specification */
  673. ,kAsiErSynNoLeftPar /* Left parenthesis expected */
  674. ,kAsiErSynMlStar /* Misleading star symbol */
  675. ,kAsiErSynMisIn /* Expected IN keyword */
  676. ,kAsiErSynWrDTField /* Wrong datetime field for extraction */
  677. ,kAsiErSynMisFrom /* Expected FROM keyword */
  678. ,kAsiErSynMisUsing /* Expected USING keyword */
  679. ,kAsiErSynFOUorTR /* Form-of-use or translation name expected */
  680. ,kAsiErSynMisTimePrec /* Missing time precision */
  681. ,kAsiErSynWrCollName /* Wrong collation name */
  682. ,kAsiErSynWrSetSq /* Set function or subquery can't be set function argument */
  683. ,kAsiErSynNoComma /* Missing comma */
  684. ,kAsiErSynNoWhen /* Missing when clause */
  685. ,kAsiErSynMisThen /* Missing then clause */
  686. ,kAsiErSynMisEnd /* Missing END */
  687. ,kAsiErSynWrNot /* Wrong usage of NOT */
  688. ,kAsiErSynNull /* NULL expected */
  689. ,kAsiErSynCompare /* Compare operator expected */
  690. ,kAsiErSynWrComma /* Wrong comma position */
  691. ,kAsiErSynMask /* Mask should be of character type */
  692. ,kAsiErSynEsc /* Escape character expected */
  693. ,kAsiErSynMisSq /* Subquery expected */
  694. ,kAsiErSynAndBet /* AND was missed in BETWEEN predicate */
  695. ,kAsiErSynNotJoin /* Not a joined table */
  696. ,kAsiErSynMisJoin /* Missing JOIN keyword */
  697. ,kAsiErSynWrNatural /* Union join can't be natural union */
  698. ,kAsiErSynMisJoinSpec /* Misleading join specification */
  699. ,kAsiErSynMisCorName /* Missing correlation name */
  700. ,kAsiErSynWrTabSpec /* Wrong table specification */
  701. ,kAsiErSynEmptyList /* List of columns is empty */
  702. ,kAsiErSynNoJoinSpec /* Missing join specification */
  703. ,kAsiErSynMisName /* Missing database object name */
  704. ,kAsiErSynMisQueryPrimary /* Missing query primary */
  705. ,kAsiErSynEEEEEEEEEEEEEEE /* Not Used */
  706. ,kAsiErSynNotJoinedTable /* Not a joined table */
  707. ,kAsiErSynMisTabValConstr /* Missing table value constructor */
  708. ,kAsiErSynMisSelect /* Missing SELECT keyword */
  709. ,kAsiErSynMisColName /* Missing column name */
  710. ,kAsiErSynMisGroup /* Selection list contains set functions and columns */
  711. /* references but GROUP BY clause was missed */
  712. ,kAsiErSynNotScalar /* Scalar expression expected */
  713. ,kAsiErSynElementInParen /* Element can't be in parenthesis */
  714. ,kAsiErSynOvrlDegree /* Wrong overlaps operand degree */
  715. ,kAsiErSynDegreeViolation /* Degree violation */
  716. ,kAsiErSynMisAs /* Missing keyword AS */
  717. ,kAsiErSynWrongCast /* Wrong cast */
  718. ,kAsiErSynInvalidDomain /* Invalid domain name */
  719. ,kAsiErSynCharExpected /* CHAR expected */
  720. ,kAsiErSynTypeExpected /* Data type specification expected */
  721. ,kAsiErSynWrongPrecLength /* Wrong precision or length */
  722. ,kAsiErSynScaleExpected /* Scale expected */
  723. ,kAsiErSynWrongScale /* Wrong scale */
  724. ,kAsiErSynWithTimeZoneExpected /* Wrong WITH TIME ZONE sentence */
  725. ,kAsiErSynNoVarLength /* Missing varying length */
  726. ,kAsiErSynOrderByExpected /* ORDER BY expected */
  727. ,kAsiErSynReadOnlyExpected /* READ ONLY expected */
  728. ,kAsiErSynWrongSortKey /* Wrong sort key */
  729. ,kAsiErSynEmptySortList /* Empty sort list */
  730. ,kAsiErSynWrongToken /* Wrong token was met */
  731. ,kAsiErSynWrTabName /* Wrong table name */
  732. ,kAsiErSynMisOf /* Missing keyword OF */
  733. ,kAsiErSynMisCursorName /* Missing cursor name */
  734. ,kAsiErSynMisSet /* Missing keyword SET */
  735. ,kAsiErSynMisBecome /* = expected in UPDATE set clause */
  736. ,kAsiErSynMisInto /* Missing INTO keyword */
  737. ,kAsiErSynMisValues /* Missing VALUES keyword */
  738. ,kAsiErSynMisTarget /* Missing target specification */
  739. ,kAsiErSynDubTransMode /* Diplicate definition of transaction mode */
  740. ,kAsiErSynMisSize /* Missing SIZE keyword */
  741. ,kAsiErSynWrDiagSize /* Wrong diagnostics area size */
  742. ,kAsiErSynMisTransMode /* Transaction modes are not specified */
  743. ,kAsiErSynInCompLevelMode /* Incompatible transaction access mode and isolation level */
  744. ,kAsiErSynWrConstrChkMode /* Wrong constraint checking mode */
  745. ,kAsiErSynWrConstrName /* Wrong constraint name */
  746. ,kAsiErSynMisRead /* Missing READ keyword */
  747. ,kAsiErSynMisAuthorization /* Missing AUTHORIZATION keyword */
  748. ,kAsiErSynMisTemporary /* Missing TEMPORARY keyword */
  749. ,kAsiErSynMisTable /* Missing TABLE keyword */
  750. ,kAsiErSynOnCommit /* Shall be ON COMMIT */
  751. ,kAsiErSynNotTemporary /* Commit behaviour only for temporary table */
  752. ,kAsiErSynWrComBehaviour /* Wrong commit behaviour */
  753. ,kAsiErSynMisRows /* Missing ROWS keyword */
  754. ,kAsiErSynMisTableName /* Missing table name */
  755. ,kAsiErSynWrCheckTime /* Wrong constraint time specification */
  756. ,kAsiErSynMisDeferrable /* Keyword DEFERRABLE expected */
  757. ,kAsiErSynWrNotDefer /* Initialy deferred constraint can't be not deferrable */
  758. ,kAsiErSynNotNull /* Not Null shall be specified for constraint */
  759. ,kAsiErSynPrimaryKey /* Primary key shall be specified for constraint */
  760. ,kAsiErSynMisConstr /* Missing constraint specification */
  761. ,kAsiErSynMisRefSpec /* Missing references specification */
  762. ,kAsiErSynMisRefTable /* Referenced table and columns expected */
  763. ,kAsiErSynWrMatchType /* Wrong match type of constraint */
  764. ,kAsiErSynSetAction /* Set triggered action expected */
  765. ,kAsiErSynDuplAction /* Duplicated triggered action specification */
  766. ,kAsiErSynMisTrigRule /* Missing triggered rule */
  767. ,kAsiErSynForeignKey /* Foreign key shall be specified for constraint */
  768. ,kAsiErSynNoColDef /* No column definitions */
  769. ,kAsiErSynMisAlterAction /* Missing alter action */
  770. ,kAsiErSynDropDefault /* Drop default action expected */
  771. ,kAsiErSynSetDefault /* Set default action expected */
  772. ,kAsiErSynMisDropBehaviour /* Missing drop behaviour */
  773. ,kAsiErSynNotCheckConstr /* Domain constraint shall be check constraint */
  774. ,kAsiErSynMisCheckOption /* CHECK OPTION expected */
  775. ,kAsiErSynMisCharSet /* CHARACTER SET expected */
  776. ,kAsiErSynMisCharSetSource /* Character set source expected */
  777. ,kAsiErSynCharSetExp /* Character set expected */
  778. ,kAsiErSynPadAttr /* Pad attribute expected */
  779. ,kAsiErSynMisTransName /* Missing translation name */
  780. ,kAsiErSynCollationExp /* Collation expected */
  781. ,kAsiErSynMisExternColl /* Missing external collation */
  782. ,kAsiErSynMisTo /* Missing TO keyword */
  783. ,kAsiErSynMisOn /* Missing ON keyword */
  784. ,kAsiErSynMisGrantOption /* GRANT OPTION expected */
  785. ,kAsiErSynMisFor /* Missing FOR keyword */
  786. ,kAsiErSynMisObjectName /* Missing object name */
  787. ,kAsiErSynMisGrantee /* Missing grantee */
  788. ,kAsiErSynAllPrivileges /* ALL PRIVILEGES expected */
  789. ,kAsiErSynMisIndex /* INDEX keyword expected */
  790. ,kAsiErSynAuthorExpected /* Authorization identifier expected */
  791. ,kAsiSynErDublColumnName /* Duplicate column name */
  792. ,kAsiSynErAmbTabRef /* Ambigious table reference */
  793. ,kAsiSynErTableNotFound /* Table name is not found (+ table name) */
  794. ,kAsiSynErColumnNotFound /* Column name is not found (+ column name) */
  795. ,kAsiSynErAmbColRef /* Ambigious column reference (+ column name) */
  796. ,kAsiSynErWrongParameterUsage /* Parameter was specified in wrong place */
  797. ,kAsiSynErLocalCol /* Column shall be local reference */
  798. ,kAsiSynErOuterCol /* Column shall be outer reference */
  799. ,kAsiSynErDuplDistinct /* Duplicate distinct in query specification */
  800. ,kAsiSynErArgNotColumn /* Distinct argument shall be column reference */
  801. ,kAsiSynErNoCorrColumns /* Corresponding column were not found */
  802. ,kAsiSynErWrongCorrColumn /* Wrong corresponding column name */
  803. ,kAsiSynErMustBeGroupCol /* Column reference must be a group column */
  804. ,kAsiErSynMisLeadSetFunc /* Misleading set function usage */
  805. ,kAsiErSynWrongEscLength /* Escape character must be 1 symbol length */
  806. ,kAsiErSynSimpleValue /* Should be simple value */
  807. ,kAsiErSynInvOrderSpec /* Invalid order specification */
  808. ,kAsiErSynMustBeOnlyCol /* Column shall be the single outer reference */
  809. ,kAsiErSynCursorNotFound /* Cursor name not found */
  810. ,kAsiErSynUpdateColDupl /* Column name duplicates in the set clause */
  811. ,kAsiErSynDefaultUse /* DEFAULT shall be specified in INSERT */
  812. ,kAsiErSynWrColInsert /* Wrong column name in insert list */
  813. ,kAsiErSynNotCastable /* Expression can't be casted to the specified type */
  814. ,kAsiErSynMisDefValue /* Missing default value */
  815. ,kAsiErSynMisServerName /* Missing server name */
  816. ,kAsiErSynMisCorNameForRemote /* Missing correlation name for remote table */
  817. ,kAsiErSynWrongForUpdateColSpec /* Wrong column name in FOR UPDATE specification */
  818. ,kAsiErSynNotUpdateCol /* Not updatable column */
  819. ,kAsiErSynTransMode /* Invalid transaction mode specification */
  820. ,kAsiErSynMisLevel /* Missing LEVEL keyword */
  821. ,kAsiErSynUncommComm /* Uncommitted/committed expected */
  822. ,kAsiErSynDubIsoLevel /* Duplicated specification of isolation level */
  823. ,kAsiErSynDubDiagSize /* Duplicated diagnostics size specification */
  824. ,kAsiErSynMisIsoLevel /* missing isolation level specification */
  825. ,kAsiErSynCharSetUsage /* character set usage */
  826. ,kAsiErSynCollatingSeq /* collating sequence invalid syntax */
  827. ,kAsiErSynNotCharCollate /* collation can be specified only for character data */
  828. ,kAsiErSynColCharSetMisMatch /* character set doesn't has specified collation */
  829. ,kAsiErSynDuplJoinCol /* Duplicate column name in natural or named column join */
  830. ,kAsiSynErCorrJoinColNotFound /* common join columns not found */
  831. ,kAsiSynErFunctionNotExists /* function doesn't exist */
  832. ,kAsiSynErNoMatchFunction /* no implemetation-defined function match argument list */
  833. ,kAsiSynErWrongBoolFuncUsage /* wrong boolean function usage */
  834. ,kAsiSynErWrongValueFuncUsage /* wrong value function usage */
  835. ,kAsiSQLAMBCURSOR = 0x3C00 /* ambiguous cursor name */
  836. ,kAsiSQLINVCATNAME = 0x3D00 /* invalid catalog name */
  837. ,kAsiSQLINVSCHNAME = 0x3F00 /* invalid schema name */
  838. ,kAsiSQLTR = 0x4000 /* transaction rollback */
  839. ,kAsiSQLTRINTEGRITY /* integrity constrint violation */
  840. ,kAsiSQLTRSER /* serialization failure */
  841. ,kAsiSQLTRSTMCOMP /* statement completition unknown */
  842. ,kAsiSQLSYNACS = 0x4200 /* access rule violation (permission denied) */
  843. ,kAsiSQLCHECKOPT = 0x4400 /* with check option violation */
  844. ,kAsiSQLRDA = 0x8000 /* Remote Database Access */
  845. /* Generic ASI excpetions */
  846. /* */
  847. ,kAsiEXCP = 0xA000 /* ASI Exception */
  848. ,kAsiEXCPINIT /* unable to initialize ASI */
  849. ,kAsiEXCPTERM /* error during ASI termination */
  850. ,kAsiEXCPDUPLINIT /* ASI was already initialized */
  851. ,kAsiEXCPNOTINIT /* ASI was not initialized */
  852. ,kAsiEXCPBADINI /* initialization file has errors or is corrupted */
  853. ,kAsiEXCPWRONGENV /* environment is not defined in AST configuration */
  854. ,kAsiEXCPWRENVPAR /* invalid environment parameter in AST configuration */
  855. ,kAsiNoMemory /* insufficient memory */
  856. ,kAsiErStkOvrFlw /* Stack overflow */
  857. ,kAsiErStkUnrFlw /* Stack underflow */
  858. ,kAsiInvalidParam /* Invalid parameter */
  859. ,kAsiInternalError /* Iternal error */
  860. ,kAsiFunctionNotSupported /* Function overflow */
  861. ,kAsiTryTableOverflow
  862. ,kAsiOperationNotSupported
  863. ,kAsiCannotOpenTable
  864. ,kAsiOutOfRange
  865. ,kAsiInvalidUcObject
  866. ,kAsiInvalidDDAObject /* Invalid DDA object */
  867. ,kAsiErrEofFound /* EOF found */
  868. ,kAsiErrFileLocked /* File was locked during the timeout period */
  869. ,kAsiRecLocked /* Record is locked */
  870. ,kAsiTableLocked /* Table is locked */
  871. ,kAsiNativePrepare /* Native statement cannot be prepared */
  872. ,kAsiNativeExecute /* Native statement cannot be executed */
  873. ,kAsiRemoteTabModification /* Remote table has read only access */
  874. ,kAsiInterDBExecution /* Can't execute interdatabase statement */
  875. ,kAsiErrCodePageNotDefined /* Code page not supported */
  876. ,kAsiErrCodePageFileNotFound /* Code page not supported */
  877. ,kAsiErrCodePageFormat /* Corrupted code page data */
  878. ,kAsiErrCollationNotDefined /* Collation not supported */
  879. ,kAsiErrCollationFileNotFound /* Collation not supported */
  880. ,kAsiErrCollationFormat /* Corrupted collation data */
  881. ,kAsiErrAsilocNotFound /* Cannot find asiloc.xmx */
  882. /* Interprocess Communication Exceptions */
  883. /* */
  884. ,kAsiErrDrv = 0xB000 /* IPC exceptions */
  885. ,kAsiErrOpenDrv /* OLEDB provider not registered */
  886. ,kAsiErrPathNotFound /* Path not found */
  887. ,kAsiErrProvNotSpecified /* OLEDB Provider not specified */
  888. ,kAsiErrToManyFileOpen /* Too many open files */
  889. ,kAsiErrAccessDenied /* Access denied */
  890. ,kAsiErrFileHandle /* Invalid file handle */
  891. ,kAsiErrSrvNotReg /* Services not registered */
  892. ,kAsiErrCannotRegSrv /* Unable to register services */
  893. ,kAsiErrCannotFindSrv /* csp.dll not found */
  894. ,kAsiErrNoRegEntryPoint /* Server doesn't have DllRegisterServer entry point */
  895. ,kAsiErrCannotLoadSrvDll /* Cannot load services DLL */
  896. ,kAsiErrOutPhysicalMemory /* Out of physical memory */
  897. ,kAsiErrOutSwapSpace /* Out of swap space */
  898. ,kAsiErrOLEDB20NotInstalled /* OLEDB 2.0 not installed */
  899. ,kAsiErrOLENotInit /* Cannot initialize OLE or one of its components */
  900. ,kAsiErrNoVirtualMemory /* Insufficient virtual memory space */
  901. ,kAsiErrNoConvMemory /* Insufficient conventional memory space */
  902. ,kAsiErrMDLNotFound /* MDL file not found */
  903. ,kAsiErrOpenIni /* Cannot get AST configuration information */
  904. ,kAsiErrNoEnv /* Environment name not specified */
  905. ,kAsiErrIncompEnv /* Incompatible environment */
  906. ,kAsiErrNoPath /* Driver path and name was not specified */
  907. ,kAsiErrLostConnection /* Server died, connection lost */
  908. ,kAsiErrToManyDrivers /* Too many driver loaded */
  909. ,kAsiErrInvalidName /* Driver name is invalid */
  910. ,kAsiErrNotAsiDrv /* Program referenced in AST configuration
  911. /* is not an ASI driver */
  912. ,kAsiErrOsEnv /* Bad format for OS environment */
  913. ,kAsiErrDrvInit /* Error found durring driver initialization */
  914. ,kAsiErrDrvThunk /* Trap in DBMS communication */
  915. ,kAsiErrComBuf /* Cannot create communication buffer */
  916. ,kAsiErrBlockByTSR /* User has loaded TSR from AutoCAD shell command */
  917. ,kAsiErrNoDrv /* Driver not found in AST configuration */
  918. ,kAsiErrMemoryAccess /* Memory access violatation */
  919. ,kAsiErrOS /* OS error */
  920. ,kAsiErrDrvOld /* Old driver's version */
  921. ,kAsiErrDBMSServer = 0xCF00 /* Exception raised by DBMS driver */
  922. ,kAsiErrHRESULT /* Generate HRESULT description */
  923. } EAsiError;
  924. typedef unsigned int AsiError;
  925. #define MinUserDefErrorCode 0xE000
  926. #pragma pack (pop)
  927. #if defined(__cplusplus)
  928. }
  929. #endif /* __cplusplus */
  930. #endif /* ASI_ASICONST_H */
  931. /*EOF*/