Source code of Windows XP (NT5)
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.

2395 lines
103 KiB

  1. /***********************************************************************
  2. * Microsoft Jet
  3. *
  4. * Microsoft Confidential. Copyright 1991-1993 Microsoft Corporation.
  5. *
  6. * Component:
  7. *
  8. * File: jet.h
  9. *
  10. * File Comments:
  11. *
  12. * Public header file with JET API definition.
  13. *
  14. * Revision History:
  15. *
  16. * [0] 04-Jan-92 richards Added this header
  17. *
  18. ***********************************************************************/
  19. //
  20. // This __JET500 essentially creates two version of this file in this
  21. // same file. All the jet500 stuff is in __JET500 macro
  22. //
  23. #if __JET500
  24. #include "jet500.h"
  25. //
  26. // End of 500 series jet.h
  27. #else
  28. //
  29. // Original jet.h starts here. i.e jet.h of 200 series db.
  30. //
  31. #if !defined(_JET_INCLUDED)
  32. #define _JET_INCLUDED
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36. #pragma pack(4)
  37. #if defined(_M_ALPHA) /* 0:32 Flat Model (Alpha AXP) */
  38. #define _far
  39. #define JET_API __stdcall
  40. #define JET_NODSAPI __stdcall
  41. #elif defined(M_MRX000) /* 0:32 Flat Model (MIPS Rx000) */
  42. #define _far
  43. #define JET_API __stdcall
  44. #define JET_NODSAPI __stdcall
  45. #else /* 0:32 flat model (Intel 32-bit ) */
  46. #define _far
  47. #define JET_API __stdcall /* CONSIDER: Switch to __stdcall */
  48. #define JET_NODSAPI __stdcall /* CONSIDER: Switch to __stdcall */
  49. #endif
  50. typedef long JET_ERR;
  51. typedef unsigned long JET_INSTANCE; /* Instance Identifier */
  52. typedef ULONG_PTR JET_SESID; /* Session Identifier */
  53. typedef ULONG_PTR JET_TABLEID; /* Table Identifier */
  54. typedef unsigned long JET_COLUMNID; /* Column Identifier */
  55. typedef ULONG_PTR JET_DBID; /* Database Identifier */
  56. typedef unsigned long JET_OBJTYP; /* Object Type */
  57. typedef unsigned long JET_COLTYP; /* Column Type */
  58. typedef unsigned long JET_GRBIT; /* Group of Bits */
  59. typedef unsigned long JET_ACM; /* Access Mask */
  60. typedef unsigned long JET_RNT; /* Repair Notification Type */
  61. typedef unsigned long JET_SNP; /* Status Notification Process */
  62. typedef unsigned long JET_SNT; /* Status Notification Type */
  63. typedef unsigned long JET_SNC; /* Status Notification Code */
  64. typedef double JET_DATESERIAL; /* JET_coltypDateTime format */
  65. #if defined(_M_ALPHA) /* 0:32 Flat Model (Intel 80x86) */
  66. typedef JET_ERR (__stdcall *JET_PFNSTATUS)(JET_SESID sesid, JET_SNP snp, JET_SNT snt, void _far *pv);
  67. #elif defined(M_MRX000) /* 0:32 Flat Model (MIPS Rx000) */
  68. typedef JET_ERR (__stdcall *JET_PFNSTATUS)(JET_SESID sesid, JET_SNP snp, JET_SNT snt, void _far *pv);
  69. #else /* 0:32 flat model (Alpha AXP ) */
  70. typedef JET_ERR (__stdcall *JET_PFNSTATUS)(JET_SESID sesid, JET_SNP snp, JET_SNT snt, void _far *pv);
  71. #endif
  72. /* Session information bits */
  73. #define JET_bitCIMCommitted 0x00000001
  74. #define JET_bitCIMDirty 0x00000002
  75. #define JET_bitAggregateTransaction 0x00000008
  76. /* JetGetLastErrorInfo structure */
  77. typedef struct
  78. {
  79. unsigned long cbStruct; /* Size of this structure */
  80. JET_ERR err; /* Extended error code (if any) */
  81. unsigned long ul1; /* First general purpose integer */
  82. unsigned long ul2; /* Second general purpose integer */
  83. unsigned long ul3; /* Third general purpose integer */
  84. } JET_EXTERR;
  85. /* Status Notification Structures */
  86. typedef struct /* Status Notification Progress */
  87. {
  88. unsigned long cbStruct; /* Size of this structure */
  89. unsigned long cunitDone; /* Number of units of work completed */
  90. unsigned long cunitTotal; /* Total number of units of work */
  91. } JET_SNPROG;
  92. /* ErrCount Notification Structures */
  93. typedef struct /* Status Notification Progress */
  94. {
  95. unsigned long cbStruct; /* Size of this structure */
  96. unsigned long cRecUniqueKeyViolation;
  97. unsigned long cRecTypeConversionFail;
  98. unsigned long cRecRecordLocked;
  99. unsigned long cRecTotal; /* Total number of units of work */
  100. } JET_SNERRCNT;
  101. typedef struct /* Status Notification Message */
  102. {
  103. unsigned long cbStruct; /* Size of this structure */
  104. JET_SNC snc; /* Status Notification Code */
  105. unsigned long ul; /* Numeric identifier */
  106. char sz[256]; /* Identifier */
  107. } JET_SNMSG;
  108. typedef struct
  109. {
  110. unsigned long cbStruct;
  111. JET_OBJTYP objtyp;
  112. JET_DATESERIAL dtCreate;
  113. JET_DATESERIAL dtUpdate;
  114. JET_GRBIT grbit;
  115. unsigned long flags;
  116. unsigned long cRecord;
  117. unsigned long cPage;
  118. } JET_OBJECTINFO;
  119. typedef struct
  120. {
  121. unsigned int dbid;
  122. char szDatabaseName[256];
  123. char szNewDatabaseName[256];
  124. } JET_RSTMAP; /* restore map */
  125. /* The following flags appear in the grbit field above */
  126. #define JET_bitTableInfoUpdatable 0x00000001
  127. #define JET_bitTableInfoBookmark 0x00000002
  128. #define JET_bitTableInfoRollback 0x00000004
  129. #define JET_bitTableInfoRestartable 0x00000008
  130. #define JET_bitTableInfoNoInserts 0x00000010
  131. /* The following flags occur in the flags field above */
  132. #define JET_bitSaveUIDnPWD 0x20000000 /* this bit is only */
  133. /* appropriate for rmt links */
  134. #define JET_bitObjectExclusive 0x40000000 /* Open link exclusively */
  135. #define JET_bitObjectSystem 0x80000000
  136. typedef struct
  137. {
  138. unsigned long cbStruct;
  139. JET_TABLEID tableid;
  140. unsigned long cRecord;
  141. JET_COLUMNID columnidcontainername;
  142. JET_COLUMNID columnidobjectname;
  143. JET_COLUMNID columnidobjtyp;
  144. JET_COLUMNID columniddtCreate;
  145. JET_COLUMNID columniddtUpdate;
  146. JET_COLUMNID columnidgrbit;
  147. JET_COLUMNID columnidflags;
  148. JET_COLUMNID columnidcRecord; /* Level 2 info */
  149. JET_COLUMNID columnidcPage; /* Level 2 info */
  150. } JET_OBJECTLIST;
  151. #define cObjectInfoCols 9 /* CONSIDER: Internal */
  152. typedef struct
  153. {
  154. unsigned long cbStruct;
  155. JET_TABLEID tableid;
  156. unsigned long cRecord;
  157. JET_COLUMNID columnidSid;
  158. JET_COLUMNID columnidACM;
  159. JET_COLUMNID columnidgrbit; /* grbit from JetSetAccess */
  160. } JET_OBJECTACMLIST;
  161. #define cObjectAcmCols 3 /* CONSIDER: Internal */
  162. typedef struct
  163. {
  164. unsigned long cbStruct;
  165. JET_TABLEID tableid;
  166. unsigned long cRecord;
  167. JET_COLUMNID columnidPresentationOrder;
  168. JET_COLUMNID columnidcolumnname;
  169. JET_COLUMNID columnidcolumnid;
  170. JET_COLUMNID columnidcoltyp;
  171. JET_COLUMNID columnidCountry;
  172. JET_COLUMNID columnidLangid;
  173. JET_COLUMNID columnidCp;
  174. JET_COLUMNID columnidCollate;
  175. JET_COLUMNID columnidcbMax;
  176. JET_COLUMNID columnidgrbit;
  177. JET_COLUMNID columnidDefault;
  178. JET_COLUMNID columnidBaseTableName;
  179. JET_COLUMNID columnidBaseColumnName;
  180. JET_COLUMNID columnidDefinitionName;
  181. } JET_COLUMNLIST;
  182. #define cColumnInfoCols 14 /* CONSIDER: Internal */
  183. typedef struct
  184. {
  185. unsigned long cbStruct;
  186. JET_COLUMNID columnid;
  187. JET_COLTYP coltyp;
  188. unsigned short wCountry;
  189. unsigned short langid;
  190. unsigned short cp;
  191. unsigned short wCollate; /* Must be 0 */
  192. unsigned long cbMax;
  193. JET_GRBIT grbit;
  194. } JET_COLUMNDEF;
  195. typedef struct
  196. {
  197. unsigned long cbStruct;
  198. JET_COLUMNID columnid;
  199. JET_COLTYP coltyp;
  200. unsigned short wCountry;
  201. unsigned short langid;
  202. unsigned short cp;
  203. unsigned short wFiller; /* Must be 0 */
  204. unsigned long cbMax;
  205. JET_GRBIT grbit;
  206. char szBaseTableName[256]; /* CONSIDER: Too large? */
  207. char szBaseColumnName[256]; /* CONSIDER: Too large? */
  208. } JET_COLUMNBASE;
  209. typedef struct
  210. {
  211. unsigned long cbStruct;
  212. JET_TABLEID tableid;
  213. unsigned long cRecord;
  214. JET_COLUMNID columnidindexname;
  215. JET_COLUMNID columnidgrbitIndex;
  216. JET_COLUMNID columnidcKey;
  217. JET_COLUMNID columnidcEntry;
  218. JET_COLUMNID columnidcPage;
  219. JET_COLUMNID columnidcColumn;
  220. JET_COLUMNID columnidiColumn;
  221. JET_COLUMNID columnidcolumnid;
  222. JET_COLUMNID columnidcoltyp;
  223. JET_COLUMNID columnidCountry;
  224. JET_COLUMNID columnidLangid;
  225. JET_COLUMNID columnidCp;
  226. JET_COLUMNID columnidCollate;
  227. JET_COLUMNID columnidgrbitColumn;
  228. JET_COLUMNID columnidcolumnname;
  229. } JET_INDEXLIST;
  230. #define cIndexInfoCols 15 /* CONSIDER: Internal */
  231. typedef struct
  232. {
  233. unsigned long cbStruct;
  234. JET_TABLEID tableid;
  235. unsigned long cRecord;
  236. JET_COLUMNID columnidReferenceName;
  237. JET_COLUMNID columnidgrbit;
  238. JET_COLUMNID columnidcColumn;
  239. JET_COLUMNID columnidiColumn;
  240. JET_COLUMNID columnidReferencingTableName;
  241. JET_COLUMNID columnidReferencingColumnName;
  242. JET_COLUMNID columnidReferencedTableName;
  243. JET_COLUMNID columnidReferencedColumnName;
  244. } JET_RELATIONSHIPLIST;
  245. /* for backward compatibility */
  246. typedef JET_RELATIONSHIPLIST JET_REFERENCELIST;
  247. #define cReferenceInfoCols 8 /* CONSIDER: Internal */
  248. typedef struct
  249. {
  250. unsigned long cbStruct;
  251. unsigned long ibLongValue;
  252. unsigned long itagSequence;
  253. JET_COLUMNID columnidNextTagged;
  254. } JET_RETINFO;
  255. typedef struct
  256. {
  257. unsigned long cbStruct;
  258. unsigned long ibLongValue;
  259. unsigned long itagSequence;
  260. } JET_SETINFO;
  261. typedef struct
  262. {
  263. unsigned long cbStruct;
  264. unsigned long centriesLT;
  265. unsigned long centriesInRange;
  266. unsigned long centriesTotal;
  267. } JET_RECPOS;
  268. typedef struct
  269. {
  270. unsigned long cDiscont;
  271. unsigned long cUnfixedMessyPage;
  272. unsigned long centriesLT;
  273. unsigned long centriesTotal;
  274. } PERS_OLCSTAT;
  275. typedef struct
  276. {
  277. unsigned long cDiscont;
  278. unsigned long cUnfixedMessyPage;
  279. unsigned long centriesLT;
  280. unsigned long centriesTotal;
  281. unsigned long cpgCompactFreed;
  282. } JET_OLCSTAT;
  283. typedef struct
  284. {
  285. unsigned long ctableid;
  286. JET_TABLEID rgtableid[1];
  287. } JET_MGBLIST;
  288. /*** Property Manager Structure ***/
  289. typedef struct
  290. {
  291. unsigned long cbStruct;
  292. JET_TABLEID tableid;
  293. JET_COLUMNID columnidColumnName;
  294. JET_COLUMNID columnidPropertyName;
  295. JET_COLUMNID columnidGrbit;
  296. JET_COLUMNID columnidPropertyValue;
  297. JET_COLUMNID columnidColtyp;
  298. } JET_PROPERTYLIST;
  299. /************************************************************************/
  300. /************************* JET CONSTANTS ************************/
  301. /************************************************************************/
  302. #define JET_tableidNil ((JET_TABLEID) 0xFFFFFFFF)
  303. #define JET_sesidNil ((JET_SESID) 0xFFFFFFFF)
  304. /* Max size of a bookmark */
  305. #define JET_cbBookmarkMost 256
  306. /* Max length of a object/column/index/property name */
  307. #define JET_cbNameMost 64
  308. /* Max length of a "name.name.name..." construct */
  309. #define JET_cbFullNameMost 255
  310. /* Max size of non-long-value column data */
  311. #define JET_cbColumnMost 255
  312. /* Max size of a sort/index key */
  313. #define JET_cbKeyMost 255
  314. /* Max number of components in a sort/index key */
  315. #define JET_ccolKeyMost 10
  316. /* Max number of columns in a table/query */
  317. #define JET_ccolTableMost 255
  318. /* Max Length of a property in the property manager */
  319. #define JET_cbPropertyMost 2048
  320. /* Largest initial substring of a long value used in an expression */
  321. #define JET_cbExprLVMost 0x8000L /*** 32 K ***/
  322. /* Max size of returned (from SQLDriverConnect) conn string */
  323. #define JET_cbConnectMost 255
  324. /* Max number of levels in an MGB */
  325. #define JET_wGroupLevelMax 12
  326. /* Size restrictions for Pins */
  327. #define JET_cchPINMax 20
  328. #define JET_cchPINMin 4
  329. /* System parameter codes for JetSetSystemParameter */
  330. #define JET_paramSysDbPath 0 /* Path to the system database */
  331. #define JET_paramTempPath 1 /* Path to the temporary file directory */
  332. #define JET_paramPfnStatus 2 /* Status callback function */
  333. #define JET_paramPfnError 3 /* Error callback function */
  334. #define JET_paramHwndODBC 4 /* Window handle for ODBC use */
  335. #define JET_paramIniPath 5 /* Path to the ini file */
  336. #define JET_paramPageTimeout 6 /* Red ISAM page timeout value */
  337. #define JET_paramODBCQueryTimeout 7 /* ODBC async query timeout value */
  338. #define JET_paramMaxBuffers 8 /* Bytes to use for page buffers */
  339. #define JET_paramMaxSessions 9 /* Maximum number of sessions */
  340. #define JET_paramMaxOpenTables 10 /* Maximum number of open tables */
  341. #define JET_paramMaxVerPages 11 /* Maximum number of modified pages */
  342. #define JET_paramMaxCursors 12 /* Maximum number of open cursors */
  343. #define JET_paramLogFilePath 13 /* Path to the log file directory */
  344. #define JET_paramMaxOpenTableIndexes 14 /* Maximum open table indexes */
  345. #define JET_paramMaxTemporaryTables 15 /* Maximum concurrent JetCreateIndex */
  346. #define JET_paramLogBuffers 16 /* Maximum log buffers */
  347. #define JET_paramLogFileSectors 17 /* Maximum log sectors per log file */
  348. #define JET_paramLogFlushThreshold 18 /* Log buffer flush threshold */
  349. #define JET_paramBfThrshldLowPrcnt 19 /* Low threshold ( % ) for buffers */
  350. #define JET_paramBfThrshldHighPrcnt 20 /* High threshold ( % ) for buffers */
  351. #define JET_paramWaitLogFlush 21 /* msec for waiting log flush */
  352. #define JET_paramLogFlushPeriod 22 /* msec for waiting log flush */
  353. #define JET_paramLogCheckpointPeriod 23 /* msec for waiting log flush */
  354. #define JET_paramLogWaitingUserMax 24 /* Maximum # user waiting log flush */
  355. #define JET_paramODBCLoginTimeout 25 /* ODBC connection attempt timeout value */
  356. #define JET_paramExprObject 26 /* Expression Evaluation callback */
  357. #define JET_paramGetTypeComp 27 /* Expression Evaluation callback */
  358. #define JET_paramHostVersion 28 /* Host Version callback */
  359. #define JET_paramSQLTraceMode 29 /* Enable/disable SQL tracing */
  360. #define JET_paramRecovery 30 /* Switch for log on/off */
  361. #define JET_paramRestorePath 31 /* Path to restoring directory */
  362. #define JET_paramTransactionLevel 32 /* Transaction level of session */
  363. #define JET_paramSessionInfo 33 /* Session info */
  364. #define JET_paramPageFragment 34 /* Largest page extent considered fragment */
  365. #define JET_paramJetInternal 35 /* Whether internal to JET; if set, allows ISAM to do things which are prevented in general */
  366. #define JET_paramMaxOpenDatabases 36 /* Maximum number of open databases */
  367. #define JET_paramOnLineCompact 37 /* Options for compact pages on-line */
  368. #define JET_paramFullQJet 38 /* Allow full QJet functionality */
  369. #define JET_paramRmtXactIsolation 39 /* Do not share connections with other sessions */
  370. #define JET_paramBufLRUKCorrInterval 40
  371. #define JET_paramBufBatchIOMax 41
  372. #define JET_paramPageReadAheadMax 42
  373. #define JET_paramAsynchIOMax 43
  374. #define JET_paramAssertAction 44 /* debug only determines action on assert */
  375. #define JET_paramEventSource 45 /* NT event log */
  376. #define JET_paramEventId 46 /* NT event id */
  377. #define JET_paramEventCategory 47 /* NT event category */
  378. /* Flags for JetIdle */
  379. #define JET_bitIdleRemoveReadLocks 0x00000001
  380. #define JET_bitIdleFlushBuffers 0x00000002
  381. #define JET_bitIdleCompact 0x00000004
  382. /* Flags for JetEndSession */
  383. #define JET_bitForceSessionClosed 0x00000001
  384. /* Flags for JetOpenDatabase */
  385. #define JET_bitDbReadOnly 0x00000001
  386. #define JET_bitDbExclusive 0x00000002 /* multiple opens allowed */
  387. #define JET_bitDbRemoteSilent 0x00000004
  388. #define JET_bitDbSingleExclusive 0x00000008 /* opened exactly once */
  389. /* Flags for JetCloseDatabase */
  390. #define JET_bitDbForceClose 0x00000001
  391. /* Flags for JetCreateDatabase */
  392. #define JET_bitDbEncrypt 0x00000001
  393. #define JET_bitDbVersion10 0x00000002
  394. #define JET_bitDbVersion1x 0x00000004
  395. #define JET_bitDbRecoveryOff 0x00000008 /* disable logging/recovery */
  396. #define JET_bitDbNoLogging 0x00000010 /* no logging */
  397. #define JET_bitDbCompleteConnstr 0x00000020
  398. /* Flags for JetBackup */
  399. #define JET_bitBackupIncremental 0x00000001
  400. #define JET_bitKeepOldLogs 0x00000002
  401. #define JET_bitOverwriteExisting 0x00000004
  402. /* Database types */
  403. #define JET_dbidNil ((JET_DBID) 0xFFFFFFFF)
  404. #define JET_dbidNoValid ((JET_DBID) 0xFFFFFFFE) /* used as a flag to indicate that there is no valid dbid */
  405. /* Flags for JetCreateLink */
  406. /* Can use JET_bitObjectExclusive to cause linked to database to be opened */
  407. /* exclusively. */
  408. /* Flags for JetAddColumn, JetGetColumnInfo, JetOpenTempTable */
  409. #define JET_bitColumnFixed 0x00000001
  410. #define JET_bitColumnTagged 0x00000002
  411. #define JET_bitColumnNotNULL 0x00000004
  412. #define JET_bitColumnVersion 0x00000008
  413. #define JET_bitColumnAutoincrement 0x00000010
  414. #define JET_bitColumnUpdatable 0x00000020 /* JetGetColumnInfo only */
  415. #define JET_bitColumnTTKey 0x00000040 /* JetOpenTempTable only */
  416. #define JET_bitColumnTTDescending 0x00000080 /* JetOpenTempTable only */
  417. #define JET_bitColumnNotLast 0x00000100 /* Installable ISAM option */
  418. #define JET_bitColumnRmtGraphic 0x00000200 /* JetGetColumnInfo */
  419. #define JET_bitColumnMultiValued 0x00000400
  420. /* Flags for JetMakeKey */
  421. #define JET_bitNewKey 0x00000001
  422. #define JET_bitStrLimit 0x00000002
  423. #define JET_bitSubStrLimit 0x00000004
  424. #define JET_bitNormalizedKey 0x00000008
  425. #define JET_bitKeyDataZeroLength 0x00000010
  426. #ifdef DBCS /* johnta: LIKE "ABC" not converted to ="ABC" for Japanese */
  427. #define JET_bitLikeExtra1 0x00000020
  428. #endif /* DBCS */
  429. /* Flags for ErrDispSetIndexRange */
  430. #define JET_bitRangeInclusive 0x00000001 /* CONSIDER: Internal */
  431. #define JET_bitRangeUpperLimit 0x00000002 /* CONSIDER: Internal */
  432. /* Constants for JetMove */
  433. #define JET_MoveFirst (0x80000000)
  434. #define JET_MovePrevious (-1)
  435. #define JET_MoveNext (+1)
  436. #define JET_MoveLast (0x7fffffff)
  437. /* Flags for JetMove */
  438. #define JET_bitMoveKeyNE 0x00000001
  439. #define JET_bitMoveCheckTS 0x00000002
  440. #define JET_bitMoveInPage 0x00000004
  441. /* Flags for JetSeek */
  442. #define JET_bitSeekEQ 0x00000001
  443. #define JET_bitSeekLT 0x00000002
  444. #define JET_bitSeekLE 0x00000004
  445. #define JET_bitSeekGE 0x00000008
  446. #define JET_bitSeekGT 0x00000010
  447. #define JET_bitSetIndexRange 0x00000020
  448. /* Flags for JetFastFind */
  449. #define JET_bitFFindBackwards 0x00000001
  450. #define JET_bitFFindFromCursor 0x00000004
  451. /* Flags for JetCreateIndex */
  452. #define JET_bitIndexUnique 0x00000001
  453. #define JET_bitIndexPrimary 0x00000002
  454. #define JET_bitIndexDisallowNull 0x00000004
  455. #define JET_bitIndexIgnoreNull 0x00000008
  456. #define JET_bitIndexClustered 0x00000010
  457. #define JET_bitIndexIgnoreAnyNull 0x00000020
  458. #define JET_bitIndexReference 0x80000000 /* IndexInfo only */
  459. /* Flags for index key definition */
  460. #define JET_bitKeyAscending 0x00000000
  461. #define JET_bitKeyDescending 0x00000001
  462. /* Flags for JetCreateRelationship */
  463. #define JET_bitRelationUnique 0x00000001
  464. #define JET_bitRelationDontEnforce 0x00000002
  465. #define JET_bitRelationInherited 0x00000004
  466. #define JET_bitRelationTestLegal 0x00000008 /* don't create relationship */
  467. #define JET_bitRelationshipMatchMask 0x000000F0
  468. #define JET_bitRelationMatchDefault 0x00000000
  469. #define JET_bitRelationMatchFull 0x00000010
  470. #define JET_bitRelationUpdateActionMask 0x00000F00
  471. #define JET_bitRelationUpdateDisallow 0x00000000
  472. #define JET_bitRelationUpdateCascade 0x00000100
  473. #define JET_bitRelationUpdateSetNull 0x00000200
  474. #define JET_bitRelationUpdateSetDefault 0x00000300
  475. #define JET_bitRelationDeleteActionMask 0x0000F000
  476. #define JET_bitRelationDeleteDisallow 0x00000000
  477. #define JET_bitRelationDeleteCascade 0x00001000
  478. #define JET_bitRelationDeleteSetNull 0x00002000
  479. #define JET_bitRelationDeleteSetDefault 0x00003000
  480. #define JET_bitRelationUserMask 0xFF000000 /* non-enforced values */
  481. #define JET_bitRelationJoinMask 0x03000000
  482. #define JET_bitRelationInner 0x00000000
  483. #define JET_bitRelationLeft 0x01000000
  484. #define JET_bitRelationRight 0x02000000
  485. /* Flags for JetCreateReference/JetCreateRelationship */
  486. /* NOTE: use the bitRelationship flags instead! */
  487. #define JET_ReferenceUnique JET_bitRelationUnique
  488. #define JET_ReferenceDontEnforce JET_bitRelationDontEnforce
  489. #define JET_ReferenceMatchTypeMask JET_bitRelationMatchMask
  490. #define JET_ReferenceMatchDefault JET_bitRelationMatchDefault
  491. #define JET_ReferenceMatchFull JET_bitRelationMatchFull
  492. #define JET_ReferenceUpdateActionMask JET_bitRelationUpdateActionMask
  493. #define JET_ReferenceUpdateDisallow JET_bitRelationUpdateDisallow
  494. #define JET_ReferenceUpdateCascade JET_bitRelationUpdateCascade
  495. #define JET_ReferenceUpdateSetNull JET_bitRelationUpdateSetNull
  496. #define JET_ReferenceUpdateSetDefault JET_bitRelationUpdateSetDefault
  497. #define JET_ReferenceDeleteActionMask JET_bitRelationDeleteActionMask
  498. #define JET_ReferenceDeleteDisallow JET_bitRelationDeleteDisallow
  499. #define JET_ReferenceDeleteCascade JET_bitRelationDeleteCascade
  500. #define JET_ReferenceDeleteSetNull JET_bitRelationDeleteSetNull
  501. #define JET_ReferenceDeleteSetDefault JET_bitRelationDeleteSetDefault
  502. /* Flags for JetOpenTable */
  503. #define JET_bitTableDenyWrite 0x00000001
  504. #define JET_bitTableDenyRead 0x00000002
  505. #define JET_bitTableReadOnly 0x00000004
  506. #define JET_bitTableAppendOnly 0x00000008
  507. #define JET_bitTableUpdatable 0x00000010
  508. #define JET_bitTableScrollable 0x00000020
  509. #define JET_bitTableFixedSet 0x00000040 /* Fixed working set */
  510. #define JET_bitTableInconsistent 0x00000080
  511. #define JET_bitTableBulk 0x00000100
  512. #define JET_bitTableUsePrimaryIndex 0x00000200 /* Use with FixedSet */
  513. #define JET_bitTableSampleData 0x00000400
  514. #define JET_bitTableQuickBrowse 0x00000800 /* Bias optimizer toward index usage */
  515. #define JET_bitTableDDL 0x00001000 /* similar to JET_bitTableBulk, for DDL */
  516. #define JET_bitTablePassThrough 0x00002000 /* Remote DBs Only */
  517. #define JET_bitTableRowReturning 0x00004000
  518. /* Flags for JetSetQoSql/JetRetrieveQoSql */
  519. #define JET_bitSqlPassThrough 0x00000001 /* Pass through Query returning records */
  520. #define JET_bitSqlSPTBulkOp 0x00000002 /* SPT query returning no table */
  521. /* Flags for JetOpenVtQbe */
  522. #define JET_bitQBEAddBrackets 0x00000001
  523. #define JET_bitQBERemoveEquals 0x00000002
  524. /* Flags for JetOpenTempTable and ErrIsamOpenTempTable */
  525. #define JET_bitTTIndexed 0x00000001 /* Allow seek */
  526. #define JET_bitTTUnique 0x00000002 /* Remove duplicates */
  527. #define JET_bitTTUpdatable 0x00000004 /* Allow updates */
  528. #define JET_bitTTScrollable 0x00000008 /* Allow backwards scrolling */
  529. /* Flags for JetSetColumn */
  530. #define JET_bitSetAppendLV 0x00000001
  531. #define JET_bitSetValidate 0x00000002
  532. #define JET_bitSetOverwriteLV 0x00000004
  533. #define JET_bitSetSizeLV 0x00000008
  534. #define JET_bitSetValidateColumn 0x00000010
  535. #define JET_bitSetZeroLength 0x00000020
  536. /* Set column parameter structure for JetSetColumns */
  537. typedef struct {
  538. JET_COLUMNID columnid;
  539. const void _far *pvData;
  540. unsigned long cbData;
  541. JET_GRBIT grbit;
  542. unsigned long ibLongValue;
  543. unsigned long itagSequence;
  544. JET_ERR err;
  545. } JET_SETCOLUMN;
  546. /* Options for JetPrepareUpdate */
  547. #define JET_prepInsert 0
  548. #define JET_prepInsertBeforeCurrent 1
  549. #define JET_prepReplace 2
  550. #define JET_prepCancel 3
  551. #define JET_prepReplaceNoLock 4
  552. #define JET_prepInsertCopy 5
  553. /* Flags for JetRetrieveColumn */
  554. #define JET_bitRetrieveCopy 0x00000001
  555. #define JET_bitRetrieveFromIndex 0x00000002
  556. #define JET_bitRetrieveCase 0x00000004
  557. #define JET_bitRetrieveTag 0x00000008
  558. #define JET_bitRetrieveRecord 0x80000000
  559. #define JET_bitRetrieveFDB 0x40000000
  560. #define JET_bitRetrieveBookmarks 0x20000000
  561. /* Retrieve column parameter structure for JetRetrieveColumns */
  562. typedef struct {
  563. JET_COLUMNID columnid;
  564. void _far *pvData;
  565. unsigned long cbData;
  566. unsigned long cbActual;
  567. JET_GRBIT grbit;
  568. unsigned long ibLongValue;
  569. unsigned long itagSequence;
  570. JET_COLUMNID columnidNextTagged;
  571. JET_ERR err;
  572. } JET_RETRIEVECOLUMN;
  573. /* Flags for JetFillFatCursor */
  574. #define JET_bitFCFillRange 0x00000001
  575. #define JET_bitFCRefreshRange 0x00000002
  576. #define JET_bitFCFillMemos 0x00000004
  577. /* Flags for JetCommitTransaction */
  578. #define JET_bitCommitFlush 0x00000001
  579. /* Flags for JetRollback */
  580. #define JET_bitRollbackAll 0x00000001
  581. /* Flags for JetSetAccess and JetGetAccess */
  582. #define JET_bitACEInheritable 0x00000001
  583. /* Flags for JetCreateSystemDatabase */
  584. #define JET_bitSysDbOverwrite 0x00000001
  585. /* Flags for Jet Property Management */
  586. #define JET_bitPropDDL 0x00000001 /* also used for setting */
  587. #define JET_bitPropInherited 0x00000002 /* not used for setting */
  588. /* JPM Flags that are only used for setting properties */
  589. #define JET_bitPropReplaceOnly 0x00000010
  590. #define JET_bitPropInsertOnly 0x00000020
  591. #define JET_bitPropDeleteOnly 0x00000040
  592. /* InfoLevels for Jet Property Management */
  593. #define JET_PropertyValue 0
  594. #define JET_PropertyCount 1
  595. #define JET_PropertySingleCollection 2
  596. #define JET_PropertyAllCollections 3
  597. /* Collate values for JetGetColumnInfo and JetGetIndexInfo */
  598. #define JET_sortBinary 0x0000
  599. #define JET_sortEFGPI 0x0100
  600. #define JET_sortSNIFD 0x0101
  601. #define JET_sortSpanish 0x0102
  602. #define JET_sortDutch 0x0103
  603. #define JET_sortSweFin 0x0104
  604. #define JET_sortNorDan 0x0105
  605. #define JET_sortIcelandic 0x0106
  606. #define JET_sortCyrillic 0x0107
  607. #define JET_sortCzech 0x0108
  608. #define JET_sortHungarian 0x0109
  609. #define JET_sortPolish 0x010A
  610. #define JET_sortArabic 0x010B
  611. #define JET_sortHebrew 0x010C
  612. #define JET_sortMax 0x010C /* Max for nonDBCS sort orders */
  613. #ifdef DBCS /* johnta: Add the new Japanese sorting order */
  614. #define JET_sortJapanese 0x010D
  615. #endif /* DBCS */
  616. #define JET_sortUnknown 0xFFFF
  617. /* Paradox ISAM specific collate values */
  618. #define JET_sortPdxIntl 0x1000
  619. #define JET_sortPdxSwedFin 0x1001
  620. #define JET_sortPdxNorDan 0x1002
  621. /* Info parameter for JetGetDatabaseInfo */
  622. #define JET_DbInfoFilename 0
  623. #define JET_DbInfoConnect 1
  624. #define JET_DbInfoCountry 2
  625. #define JET_DbInfoLangid 3
  626. #define JET_DbInfoCp 4
  627. #define JET_DbInfoCollate 5
  628. #define JET_DbInfoOptions 6
  629. #define JET_DbInfoTransactions 7
  630. #define JET_DbInfoVersion 8
  631. #define JET_DbInfoIsam 9
  632. /* Database versions returned by JetGetDatabaseInfo */
  633. #define JET_DbVersion10 0x00010000
  634. #define JET_DbVersion11 0x00010001
  635. #define JET_DbVersion20 0x00020000
  636. /* Isam specific info returned by JetGetDatabaseInfo */
  637. #define JET_IsamInvalid 0
  638. #define JET_IsamBuiltinRed 1
  639. #define JET_IsamBuiltinBlue 2
  640. #define JET_IsamInstRed 21
  641. #define JET_IsamInstBlue 22
  642. #define JET_IsamInstFox 23
  643. #define JET_IsamInstParadox 24
  644. #define JET_IsamInstDbase 25
  645. #define JET_IsamInstBtrieve 26
  646. #define JET_IsamBuilinMost JET_BuiltinBlue
  647. #define JET_IsamInstMin JET_IsamInstRed
  648. #define JET_IsamInstMost JET_IsamInstBtrieve
  649. /* Link specific info for link identification */
  650. #define JET_bitLinkInvalid 0x00000000
  651. #define JET_bitLinkRemote 0x00100000
  652. #define JET_bitLinkBuiltinRed 0x00200000
  653. #define JET_bitLinkBuiltinBlue 0x00300000
  654. #define JET_bitLinkInstRed 0x00400000
  655. #define JET_bitLinkInstBlue 0x00500000
  656. #define JET_bitLinkInstFox 0x00600000
  657. #define JET_bitLinkInstParadox 0x00700000
  658. #define JET_bitLinkInstDbase 0x00800000
  659. #define JET_bitLinkInstBtrieve 0x00900000
  660. #define JET_bitFourByteBookmark 0x00000001
  661. #define JET_bitContiguousBookmarks 0x00000002
  662. /* Column data types */
  663. /* the column types are represented with 4 bits */
  664. /* make sure the choices below fit! */
  665. /* NOTE: all comb of the 4 bits are now used! */
  666. /* CONSIDER: to allow more datatypes, either */
  667. /* CONSIDER: JET_coltypDatabase and JET_coltypTableid must */
  668. /* CONSIDER: change or the 4 bit dependancy must be removed */
  669. #define JET_coltypNil 0
  670. #define JET_coltypBit 1 /* True or False, Never NULL */
  671. #define JET_coltypUnsignedByte 2 /* 1-byte integer, unsigned */
  672. #define JET_coltypShort 3 /* 2-byte integer, signed */
  673. #define JET_coltypLong 4 /* 4-byte integer, signed */
  674. #define JET_coltypCurrency 5 /* 8 byte integer, signed */
  675. #define JET_coltypIEEESingle 6 /* 4-byte IEEE single precision */
  676. #define JET_coltypIEEEDouble 7 /* 8-byte IEEE double precision */
  677. #define JET_coltypDateTime 8 /* Integral date, fractional time */
  678. #define JET_coltypBinary 9 /* Binary data, < 255 bytes */
  679. #define JET_coltypText 10 /* ANSI text, case insensitive, < 255 bytes */
  680. #define JET_coltypLongBinary 11 /* Binary data, long value */
  681. #define JET_coltypLongText 12 /* ANSI text, long value */
  682. /* The following are additional types used for query parameters */
  683. /* NOTE: Code depends on these being contiguous with the normal coltyps */
  684. /* CONSIDER: Remove the above dependency on contiguous coltyps in QJET */
  685. #define JET_coltypDatabase 13 /* Database name parameter */
  686. #define JET_coltypTableid 14 /* Tableid parameter */
  687. #define JET_coltypOLE 15 /* OLE blob */
  688. #define JET_coltypMax 16 /* the number of column types */
  689. /* used for validity tests and */
  690. /* array declarations. */
  691. /* Info levels for JetGetObjectInfo */
  692. #define JET_ObjInfo 0U
  693. #define JET_ObjInfoListNoStats 1U
  694. #define JET_ObjInfoList 2U
  695. #define JET_ObjInfoSysTabCursor 3U
  696. #define JET_ObjInfoListACM 4U /* Blocked by JetGetObjectInfo */
  697. #define JET_ObjInfoNoStats 5U
  698. #define JET_ObjInfoSysTabReadOnly 6U
  699. #define JET_ObjInfoRulesLoaded 7U
  700. #define JET_ObjInfoMax 8U
  701. /* Info levels for JetGetTableInfo */
  702. #define JET_TblInfo 0U
  703. #define JET_TblInfoName 1U
  704. #define JET_TblInfoDbid 2U
  705. #define JET_TblInfoMostMany 3U
  706. #define JET_TblInfoRvt 4U
  707. #define JET_TblInfoOLC 5U
  708. #define JET_TblInfoResetOLC 6U
  709. #define JET_TblInfoSpaceUsage 7U
  710. #define JET_TblInfoDumpTable 8U
  711. /* Info levels for JetGetIndexInfo and JetGetTableIndexInfo */
  712. #define JET_IdxInfo 0U
  713. #define JET_IdxInfoList 1U
  714. #define JET_IdxInfoSysTabCursor 2U
  715. #define JET_IdxInfoOLC 3U
  716. #define JET_IdxInfoResetOLC 4U
  717. /* Info levels for JetGetReferenceInfo and JetGetTableReferenceInfo */
  718. #define JET_ReferenceInfo 0U
  719. #define JET_ReferenceInfoReferencing 1U
  720. #define JET_ReferenceInfoReferenced 2U
  721. #define JET_ReferenceInfoAll 3U
  722. #define JET_ReferenceInfoCursor 4U
  723. /* Info levels for JetGetColumnInfo and JetGetTableColumnInfo */
  724. #define JET_ColInfo 0U
  725. #define JET_ColInfoList 1U
  726. /* CONSIDER: Info level 2 is valid */
  727. #define JET_ColInfoSysTabCursor 3U
  728. #define JET_ColInfoBase 4U
  729. /* Attribute types for query definitions */
  730. #define JET_qoaBeginDef 0
  731. #define JET_qoaOperation 1
  732. #define JET_qoaParameter 2
  733. #define JET_qoaOptions 3
  734. #define JET_qoaDatabase 4
  735. #define JET_qoaInputTable 5
  736. #define JET_qoaOutput 6
  737. #define JET_qoaJoin 7
  738. #define JET_qoaRestriction 8
  739. #define JET_qoaGroup 9
  740. #define JET_qoaGroupRstr 10
  741. #define JET_qoaOrdering 11
  742. #define JET_qoaEndDef 255
  743. #define JET_qoaValidLeast JET_qoaOperation
  744. #define JET_qoaValidMost JET_qoaOrdering
  745. /* Query object options */
  746. #define JET_bitFqoOutputAllCols 0x0001
  747. #define JET_bitFqoRemoveDups 0x0002
  748. #define JET_bitFqoOwnerAccess 0x0004
  749. #define JET_bitFqoDistinctRow 0x0008
  750. #define JET_bitFqoTop 0x0010
  751. #define JET_bitFqoPercent 0x0020
  752. #define JET_bitFqoCorresponding 0x0040 /* JET_qopSetOperation */
  753. /* Query object join type */
  754. #define JET_fjoinInner 1
  755. #define JET_fjoinLeftOuter 2
  756. #define JET_fjoinRightOuter 3
  757. /* Query object operations */
  758. #define JET_qopSelect 1
  759. #define JET_qopSelectInto 2
  760. #define JET_qopInsertSelection 3
  761. #define JET_qopUpdate 4
  762. #define JET_qopDelete 5
  763. #define JET_qopTransform 6
  764. #define JET_qopDDL 7
  765. #define JET_qopSqlPassThrough 8
  766. #define JET_qopSetOperation 9
  767. #define JET_qopSPTBulk 10
  768. #define JET_bitqopSelect 0x0000
  769. #define JET_bitqopTransform 0x0010
  770. #define JET_bitqopDelete 0x0020
  771. #define JET_bitqopUpdate 0x0030
  772. #define JET_bitqopInsertSelection 0x0040
  773. #define JET_bitqopSelectInto 0x0050
  774. #define JET_bitqopDDL 0x0060
  775. #define JET_bitqopSqlPassThrough 0x0070
  776. #define JET_bitqopSetOperation 0x0080
  777. #define JET_bitqopSPTBulk 0x0090
  778. /* Engine Object Types */
  779. #define JET_objtypNil 0
  780. #define JET_objtypTable 1
  781. #define JET_objtypDb 2
  782. #define JET_objtypContainer 3
  783. #define JET_objtypSQLLink 4
  784. #define JET_objtypQuery 5
  785. #define JET_objtypLink 6
  786. #define JET_objtypTemplate 7
  787. #define JET_objtypRelationship 8
  788. /* All types less than JET_objtypClientMin are reserved by JET */
  789. #define JET_objtypClientMin 0x8000
  790. /* Security Constant Values */
  791. #define JET_cchUserNameMax 20
  792. #define JET_cchPasswordMax 14
  793. /* Security Access Masks */
  794. #define JET_acmNoAccess 0x00000000L
  795. #define JET_acmFullAccess 0x000FFFFFL
  796. #define JET_acmSpecificMask 0x0000FFFFL
  797. #define JET_acmSpecific_1 0x00000001L
  798. #define JET_acmSpecific_2 0x00000002L
  799. #define JET_acmSpecific_3 0x00000004L
  800. #define JET_acmSpecific_4 0x00000008L
  801. #define JET_acmSpecific_5 0x00000010L
  802. #define JET_acmSpecific_6 0x00000020L
  803. #define JET_acmSpecific_7 0x00000040L
  804. #define JET_acmSpecific_8 0x00000080L
  805. #define JET_acmSpecific_9 0x00000100L
  806. #define JET_acmSpecific_10 0x00000200L
  807. #define JET_acmSpecific_11 0x00000400L
  808. #define JET_acmSpecific_12 0x00000800L
  809. #define JET_acmSpecific_13 0x00001000L
  810. #define JET_acmSpecific_14 0x00002000L
  811. #define JET_acmSpecific_15 0x00004000L
  812. #define JET_acmSpecific_16 0x00008000L
  813. #define JET_acmStandardMask 0x00FF0000L
  814. #define JET_acmDelete 0x00010000L
  815. #define JET_acmReadControl 0x00020000L
  816. #define JET_acmWriteDac 0x00040000L
  817. #define JET_acmWriteOwner 0x00080000L
  818. #define JET_acmTblCreate (JET_acmSpecific_1)
  819. #define JET_acmTblAccessRcols (JET_acmSpecific_2)
  820. #define JET_acmTblReadDef (JET_acmSpecific_3)
  821. #define JET_acmTblWriteDef (JET_acmSpecific_4)
  822. #define JET_acmTblRetrieveData (JET_acmSpecific_5)
  823. #define JET_acmTblInsertData (JET_acmSpecific_6)
  824. #define JET_acmTblReplaceData (JET_acmSpecific_7)
  825. #define JET_acmTblDeleteData (JET_acmSpecific_8)
  826. #define JET_acmDbCreate (JET_acmSpecific_1)
  827. #define JET_acmDbOpen (JET_acmSpecific_2)
  828. /* Compact Options */
  829. #define JET_bitCompactEncrypt 0x00000001 /* Dest is encrypted */
  830. #define JET_bitCompactDecrypt 0x00000002 /* Dest is not encrypted */
  831. #define JET_bitCompactDontCopyLocale 0x00000004 /* Don't copy locale from source to dest */
  832. #define JET_bitCompactVersion10 0x00000008 /* Destination is version 1.0 format */
  833. #define JET_bitCompactVersion1x 0x00000010 /* Destination is version 1.x format */
  834. /* On-line Compact Options */
  835. #define JET_bitCompactOn 0x00000001 /* enable on-line compaction */
  836. /* Repair Notification Types */
  837. #define JET_rntSelfContained 0 /* CONSIDER: These are SNCs */
  838. #define JET_rntDeletedIndex 1
  839. #define JET_rntDeletedRec 2
  840. #define JET_rntDeletedLv 3
  841. #define JET_rntTruncated 4
  842. /* Status Notification Processes */
  843. #define JET_snpIndex 0
  844. #define JET_snpQuery 1
  845. #define JET_snpRepair 2
  846. #define JET_snpImex 3
  847. #define JET_snpCompact 4
  848. #define JET_snpFastFind 5
  849. #define JET_snpODBCNotReady 6
  850. #define JET_snpQuerySort 7
  851. #define JET_snpRestore 8
  852. /* Status Notification Types */
  853. #define JET_sntProgress 0 /* callback for progress */
  854. #define JET_sntMessage 1
  855. #define JET_sntBulkRecords 2 /* callback for # rec for bulk op */
  856. #define JET_sntFail 3 /* callback for failure during progress */
  857. #define JET_sntErrCount 4 /* callback for err count */
  858. #define JET_sntBegin 5 /* callback for beginning of operation */
  859. #define JET_sntComplete 6 /* callback for completion of operation */
  860. #define JET_sntCantRollback 7 /* callback for no rollback */
  861. #define JET_sntRestoreMap 8 /* callback for restore map */
  862. /* Message codes for JET_snpCompact */
  863. #define JET_sncCopyObject 0 /* Starting to copy object */
  864. #define JET_sncCopyFailed 1 /* Copy of this object failed */
  865. #define JET_sncYield 2 /* Client can yield/check for user interrupt */
  866. #define JET_sncTransactionFull 3 /* Client can yield/check for user interrupt */
  867. #define JET_sncAboutToWrap 4 /* Find find is about to wrap */
  868. /* Message codes for JET_snpODBCNotReady */
  869. #define JET_sncODBCNotReady 0 /* Waiting for results from ODBC */
  870. /* Constants for the [ODBC] section of JET.INI */
  871. #define JET_SQLTraceCanonical 0x0001 /* Output ODBC Generic SQL */
  872. /* Constants for the [Debug] section of JET.INI */
  873. /* APITrace */
  874. #define JET_APITraceEnter 0x0001
  875. #define JET_APITraceExit 0x0002
  876. #define JET_APITraceExitError 0x0004
  877. #define JET_APIBreakOnError 0x0008
  878. #define JET_APITraceCount 0x0010
  879. #define JET_APITraceNoIdle 0x0020
  880. #define JET_APITraceParameters 0x0040
  881. /* IdleTrace */
  882. #define JET_IdleTraceCursor 0x0001
  883. #define JET_IdleTraceBuffer 0x0002
  884. #define JET_IdleTraceFlush 0x0004
  885. /* AssertAction */
  886. #define JET_AssertExit 0x0000 /* Exit the application */
  887. #define JET_AssertBreak 0x0001 /* Break to debugger */
  888. #define JET_AssertMsgBox 0x0002 /* Display message box */
  889. #define JET_AssertStop 0x0004 /* Alert and stop */
  890. /* IOTrace */
  891. #define JET_IOTraceAlloc 0x0001 /* DB Page Allocation */
  892. #define JET_IOTraceFree 0x0002 /* DB Page Free */
  893. #define JET_IOTraceRead 0x0004 /* DB Page Read */
  894. #define JET_IOTraceWrite 0x0008 /* DB Page Write */
  895. #define JET_IOTraceError 0x0010 /* DB Page I/O Error */
  896. /* MemTrace */
  897. #define JET_MemTraceAlloc 0x0001 /* Memory allocation */
  898. #define JET_MemTraceRealloc 0x0002 /* Memory reallocation */
  899. #define JET_MemTraceFree 0x0004 /* Memory free */
  900. /* RmtTrace */
  901. #define JET_RmtTraceError 0x0001 /* Remote server error message */
  902. #define JET_RmtTraceSql 0x0002 /* Remote SQL Prepares & Exec's */
  903. #define JET_RmtTraceAPI 0x0004 /* Remote ODBC API calls */
  904. #define JET_RmtTraceODBC 0x0008
  905. #define JET_RmtSyncODBC 0x0010 /* Turn on ODBC Sync mode */
  906. /**********************************************************************/
  907. /*********************** ERROR CODES **************************/
  908. /**********************************************************************/
  909. /* SUCCESS */
  910. #define JET_errSuccess 0 /* Successful Operation */
  911. /* ERRORS */
  912. #define JET_wrnNyi -1 /* Function Not Yet Implemented */
  913. /* SYSTEM errors
  914. /**/
  915. #define JET_errRfsFailure -100 /* JET_errRfsFailure */
  916. #define JET_errRfsNotArmed -101 /* JET_errRfsFailure */
  917. #define JET_errFileClose -102 /* Could not close DOS file */
  918. #define JET_errNoMoreThreads -103 /* Could not start thread */
  919. #define JET_errNoComputerName -104 /* fail to get computername */
  920. #define JET_errTooManyIO -105 /* System busy due to too many IOs */
  921. /* BUFFER MANAGER errors
  922. /**/
  923. #define wrnBFNotSynchronous 200 /* Buffer page evicted */
  924. #define wrnBFPageNotFound 201 /* Page not found */
  925. #define errBFInUse -202 /* Cannot abandon buffer */
  926. /* DIRECTORY MANAGER errors
  927. /**/
  928. #define errPMOutOfPageSpace -300 /* Out of page space */
  929. #define errPMItagTooBig -301 /* Itag too big */
  930. #define errPMRecDeleted -302 /* Record deleted */
  931. #define errPMTagsUsedUp -303 /* Tags used up */
  932. #define wrnBMConflict 304 /* conflict in BM Clean up */
  933. #define errDIRNoShortCircuit -305 /* No Short Circuit Avail */
  934. #define errDIRCannotSplit -306 /* Cannot horizontally split FDP */
  935. #define errDIRTop -307 /* Cannot go up */
  936. #define errDIRFDP 308 /* On an FDP Node */
  937. #define errDIRNotSynchronous -309 /* May have left critical section */
  938. #define wrnDIREmptyPage 310 /* Moved through empty page */
  939. #define errSPConflict -311 /* Device extent being extended */
  940. #define wrnNDFoundLess 312 /* Found Less */
  941. #define wrnNDFoundGreater 313 /* Found Greater */
  942. #define errNDOutSonRange -314 /* Son out of range */
  943. #define errNDOutItemRange -315 /* Item out of range */
  944. #define errNDGreaterThanAllItems -316 /* Greater than all items */
  945. #define errNDLastItemNode -317 /* Last node of item list */
  946. #define errNDFirstItemNode -318 /* First node of item list */
  947. #define wrnNDDuplicateItem 319 /* Duplicated Item */
  948. #define errNDNoItem -320 /* Item not there */
  949. #define JET_wrnRemainingVersions 321 /* Some versions couldn't be cleaned */
  950. #define JET_wrnPreviousVersion 322 /* Version already existed */
  951. #define JET_errPageBoundary -323 /* Reached Page Boundary */
  952. #define JET_errKeyBoundary -324 /* Reached Key Boundary */
  953. #define errDIRInPageFather -325 /* sridFather in page to free
  954. /* RECORD MANAGER errors
  955. /**/
  956. #define wrnFLDKeyTooBig 400 /* Key too big (truncated it) */
  957. #define errFLDTooManySegments -401 /* Too many key segments */
  958. #define wrnFLDNullKey 402 /* Key is entirely NULL */
  959. #define wrnFLDOutOfKeys 403 /* No more keys to extract */
  960. #define wrnFLDNullSeg 404 /* Null segment in key */
  961. #define wrnRECLongField 405 /* Separated long field */
  962. #define JET_wrnRecordFoundGreater JET_wrnSeekNotEqual
  963. #define JET_wrnRecordFoundLess JET_wrnSeekNotEqual
  964. #define JET_errColumnIllegalNull JET_errNullInvalid
  965. /* LOGGING/RECOVERY errors
  966. /**/
  967. #define JET_errRestoreFailed -500 /* Restore failed */
  968. #define JET_errLogFileCorrupt -501 /* Log file is corrupt */
  969. #define errLGNoMoreRecords -502 /* Last log record read */
  970. #define JET_errNoBackupDirectory -503 /* No backup directory given */
  971. #define JET_errBackupDirectoryNotEmpty -504 /* The backup directory is not emtpy */
  972. #define JET_errBackupInProgress -505 /* Backup is active already */
  973. #define JET_errFailRestoreDatabase -506 /* Fail to restore (copy) database */
  974. #define JET_errNoDatabasesForRestore -507 /* No databases for restor found */
  975. #define JET_errMissingLogFile -508 /* jet.log for restore is missing */
  976. #define JET_errMissingPreviousLogFile -509 /* Missing the log file for check point */
  977. #define JET_errLogWriteFail -510 /* Fail when writing to log file */
  978. #define JET_errLogNotContigous -511 /* Fail to incremental backup for non-contiguous generation number */
  979. #define JET_errFailToMakeTempDirectory -512 /* Fail to make a temp directory */
  980. #define JET_errFailToCleanTempDirectory -513 /* Fail to clean up temp directory */
  981. #define JET_errBadLogVersion -514 /* Version of log file is not compatible with Jet version */
  982. #define JET_errBadNextLogVersion -515 /* Version of next log file is not compatible with current one */
  983. #define JET_errLoggingDisabled -516 /* Log is not active */
  984. #define JET_errLogBufferTooSmall -517 /* Log buffer is too small for recovery */
  985. #define errLGNotSynchronous -518 /* retry to LGLogRec */
  986. #define JET_errFeatureNotAvailable -1001 /* API not supported */
  987. #define JET_errInvalidName -1002 /* Invalid name */
  988. #define JET_errInvalidParameter -1003 /* Invalid API parameter */
  989. #define JET_wrnColumnNull 1004 /* Column is NULL-valued */
  990. #define JET_errReferenceNotFound -1005 /* No such reference */
  991. #define JET_wrnBufferTruncated 1006 /* Buf too short, data truncated */
  992. #define JET_wrnDatabaseAttached 1007 /* Database is already attached */
  993. #define JET_wrnOnEndPoint 1008 /* On end point */
  994. #define JET_wrnSortOverflow 1009 /* Sort does not fit in memory */
  995. #define JET_errInvalidDatabaseId -1010 /* Invalid database id */
  996. #define JET_errOutOfMemory -1011 /* Out of Memory */
  997. #define JET_errCantAllocatePage -1012 /* Couldn't allocate a page */
  998. #define JET_errNoMoreCursors -1013 /* Max # of cursors allocated */
  999. #define JET_errOutOfBuffers -1014 /* JET_errOutOfBuffers */
  1000. #define JET_errTooManyIndexes -1015 /* Too many indexes */
  1001. #define JET_errTooManyKeys -1016 /* Too many columns in an index */
  1002. #define JET_errRecordDeleted -1017 /* Record has been deleted */
  1003. #define JET_errReadVerifyFailure -1018 /* Read verification error */
  1004. #define JET_errFilesysVersion -1019 /* Obsolete database format */
  1005. #define JET_errNoMoreFiles -1020 /* No more file handles */
  1006. #define JET_errDiskNotReady -1021 /* Disk not ready */
  1007. #define JET_errDiskIO -1022 /* JET_errDiskIO */
  1008. #define JET_errInvalidPath -1023 /* JET_errInvalidPath */
  1009. #define JET_errFileShareViolation -1024 /* JET_errFileShareViolation */
  1010. #define JET_errFileLockViolation -1025 /* JET_errFileLockViolation */
  1011. #define JET_errRecordTooBig -1026 /* JET_errRecordTooBig */
  1012. #define JET_errTooManyOpenDatabases -1027 /* Database limit reached */
  1013. #define JET_errInvalidDatabase -1028 /* This isn't a database */
  1014. #define JET_errNotInitialized -1029 /* JetInit not yet called */
  1015. #define JET_errAlreadyInitialized -1030 /* JetInit already called */
  1016. #define JET_errFileLockingUnavailable -1031 /* JET_errFileLockingUnavailable */
  1017. #define JET_errFileAccessDenied -1032 /* JET_errFileAccessDenied */
  1018. #define JET_errSharingBufferExceeded -1033 /* OS sharing buffer exceeded */
  1019. #define JET_errQueryNotSupported -1034 /* Query support unavailable */
  1020. #define JET_errSQLLinkNotSupported -1035 /* SQL Link support unavailable */
  1021. #define JET_errTaskLimitExceeded -1036 /* Too many client tasks */
  1022. #define JET_errUnsupportedOSVersion -1037 /* Unsupported OS version */
  1023. #define JET_errBufferTooSmall -1038 /* Buffer is too small */
  1024. #define JET_wrnSeekNotEqual 1039 /* SeekLE or SeekGE didn't find exact match */
  1025. #define JET_errTooManyColumns -1040 /* Too many columns defined */
  1026. #define JET_errTooManyFixedColumns -1041 /* Too many fixed columns defined */
  1027. #define JET_errTooManyVariableColumns -1042 /* Too many variable columns defined */
  1028. #define JET_errContainerNotEmpty -1043 /* Container is not empty */
  1029. #define JET_errInvalidFilename -1044 /* Filename is invalid */
  1030. #define JET_errInvalidBookmark -1045 /* Invalid bookmark */
  1031. #define JET_errColumnInUse -1046 /* Column used in an index */
  1032. #define JET_errInvalidBufferSize -1047 /* Data buffer doesn't match column size */
  1033. #define JET_errColumnNotUpdatable -1048 /* Can't set column value */
  1034. #define JET_wrnCommitNotFlushed 1049 /* Commit did not flush to disk */
  1035. #define JET_errAbortSalvage -1050 /* Forced Salvager abort */
  1036. #define JET_errIndexInUse -1051 /* Index is in use */
  1037. #define JET_errLinkNotSupported -1052 /* Link support unavailable */
  1038. #define JET_errNullKeyDisallowed -1053 /* Null keys are disallowed on index */
  1039. #define JET_errNotInTransaction -1054 /* JET_errNotInTransaction */
  1040. #define JET_wrnNoErrorInfo 1055 /* No extended error information */
  1041. #define JET_errInstallableIsamNotFound -1056 /* Installable ISAM not found */
  1042. #define JET_errOperationCancelled -1057 /* Operation canceled by client */
  1043. #define JET_wrnNoIdleActivity 1058 /* No idle activity occured */
  1044. #define JET_errTooManyActiveUsers -1059 /* Too many active database users */
  1045. #define JET_errInvalidAppend -1060 /* Cannot append long value */
  1046. #define JET_errInvalidCountry -1061 /* Invalid or unknown country code */
  1047. #define JET_errInvalidLanguageId -1062 /* Invalid or unknown language id */
  1048. #define JET_errInvalidCodePage -1063 /* Invalid or unknown code page */
  1049. #define JET_errCantBuildKey -1064 /* Can't build key for this sort order. */
  1050. #define JET_errIllegalReentrancy -1065 /* Re-entrancy on same cursor family */
  1051. #define JET_errIllegalRelationship -1066 /* Can't create relationship */
  1052. #define JET_wrnNoWriteLock 1067 /* No write lock at transaction level 0 */
  1053. #define JET_errDBVerFeatureNotAvailable -1067 /* API not supported using old database format*/
  1054. #define JET_errCantBegin -1101 /* Cannot BeginSession */
  1055. #define JET_errWriteConflict -1102 /* Write lock failed due to outstanding write lock */
  1056. #define JET_errTransTooDeep -1103 /* Xactions nested too deeply */
  1057. #define JET_errInvalidSesid -1104 /* Invalid session handle */
  1058. #define JET_errReadConflict -1105 /* Commit lock failed due to outstanding read lock */
  1059. #define JET_errCommitConflict -1106 /* Read lock failed due to outstanding commit lock */
  1060. #define JET_errSessionWriteConflict -1107 /* Another session has private version of page */
  1061. #define JET_errInTransaction -1108 /* Operation not allowed within a transaction */
  1062. #define JET_errDatabaseDuplicate -1201 /* Database already exists */
  1063. #define JET_errDatabaseInUse -1202 /* Database in use */
  1064. #define JET_errDatabaseNotFound -1203 /* No such database */
  1065. #define JET_errDatabaseInvalidName -1204 /* Invalid database name */
  1066. #define JET_errDatabaseInvalidPages -1205 /* Invalid number of pages */
  1067. #define JET_errDatabaseCorrupted -1206 /* non-db file or corrupted db */
  1068. #define JET_errDatabaseLocked -1207 /* Database exclusively locked */
  1069. #define JET_wrnDatabaseEncrypted 1208 /* Database is encrypted */
  1070. #define JET_wrnTableEmpty 1301 /* Open an empty table */
  1071. #define JET_errTableLocked -1302 /* Table is exclusively locked */
  1072. #define JET_errTableDuplicate -1303 /* Table already exists */
  1073. #define JET_errTableInUse -1304 /* Table is in use, cannot lock */
  1074. #define JET_errObjectNotFound -1305 /* No such table or object */
  1075. #define JET_errCannotRename -1306 /* Cannot rename temporary file */
  1076. #define JET_errDensityInvalid -1307 /* Bad file/index density */
  1077. #define JET_errTableNotEmpty -1308 /* Cannot define clustered index */
  1078. #define JET_errTableNotLocked -1309 /* No DDLs w/o exclusive lock */
  1079. #define JET_errInvalidTableId -1310 /* Invalid table id */
  1080. #define JET_errTooManyOpenTables -1311 /* Cannot open any more tables */
  1081. #define JET_errIllegalOperation -1312 /* Oper. not supported on table */
  1082. #define JET_wrnExecSegReleased 1313 /* Query Execution segment is released */
  1083. #define JET_errObjectDuplicate -1314 /* Table or object name in use */
  1084. #define JET_errRulesLoaded -1315 /* Rules loaded, can't define more */
  1085. #define JET_errInvalidObject -1316 /* object is invalid for operation */
  1086. #define JET_errIndexCantBuild -1401 /* Cannot build clustered index */
  1087. #define JET_errIndexHasPrimary -1402 /* Primary index already defined */
  1088. #define JET_errIndexDuplicate -1403 /* Index is already defined */
  1089. #define JET_errIndexNotFound -1404 /* No such index */
  1090. #define JET_errIndexMustStay -1405 /* Cannot delete clustered index */
  1091. #define JET_errIndexInvalidDef -1406 /* Illegal index definition */
  1092. #define JET_errSelfReference -1407 /* Referencing/Referenced index is the same */
  1093. #define JET_errIndexHasClustered -1408 /* Clustered index already defined */
  1094. #define JET_errColumnLong -1501 /* column value is long */
  1095. #define JET_errColumnNoChunk -1502 /* no such chunk in field */
  1096. #define JET_errColumnDoesNotFit -1503 /* Field will not fit in record */
  1097. #define JET_errNullInvalid -1504 /* Null not valid */
  1098. #define JET_errColumnIndexed -1505 /* Column indexed, cannot delete */
  1099. #define JET_errColumnTooBig -1506 /* Field length is > maximum */
  1100. #define JET_errColumnNotFound -1507 /* No such column */
  1101. #define JET_errColumnDuplicate -1508 /* Field is already defined */
  1102. #define JET_errTaggedDefault -1509 /* No defaults on tagged fields */
  1103. #define JET_errColumn2ndSysMaint -1510 /* Second autoinc or version column */
  1104. #define JET_errInvalidColumnType -1511 /* Invalid column data type */
  1105. #define JET_wrnColumnMaxTruncated 1512 /* Max length too big, truncated */
  1106. #define JET_errColumnCannotIndex -1513 /* Cannot index Bit,LongText,LongBinary */
  1107. #define JET_errTaggedNotNULL -1514 /* No non-NULL tagged fields */
  1108. #define JET_errNoCurrentIndex -1515 /* Invalid w/o a current index */
  1109. #define JET_errKeyIsMade -1516 /* The key is completely made */
  1110. #define JET_errBadColumnId -1517 /* Column Id Incorrect */
  1111. #define JET_errBadItagSequence -1518 /* Bad itagSequence for tagged column */
  1112. #define JET_errColumnInRelationship -1519 /* Cannot delete, column participates in relationship */
  1113. #define JET_wrnCopyLongValue 1520 /* Single instance column bursted */
  1114. #define JET_errCannotBeTagged -1521 /* AutoIncrement and Version cannot be tagged */
  1115. #define JET_errRecordNotFound -1601 /* The key was not found */
  1116. #define JET_errRecordNoCopy -1602 /* No working buffer */
  1117. #define JET_errNoCurrentRecord -1603 /* Currency not on a record */
  1118. #define JET_errRecordClusteredChanged -1604 /* Primary key may not change */
  1119. #define JET_errKeyDuplicate -1605 /* Illegal duplicate key */
  1120. #define JET_errCannotInsertBefore -1606 /* Cannot insert before current */
  1121. #define JET_errAlreadyPrepared -1607 /* Already copy/clear current */
  1122. #define JET_errKeyNotMade -1608 /* No call to JetMakeKey */
  1123. #define JET_errUpdateNotPrepared -1609 /* No call to JetPrepareUpdate */
  1124. #define JET_wrnDataHasChanged 1610 /* Data has changed */
  1125. #define JET_errDataHasChanged -1611 /* Data has changed; operation aborted */
  1126. #define JET_errIntegrityViolationMaster -1612 /* References to key exist */
  1127. #define JET_errIntegrityViolationSlave -1613 /* No referenced key exists */
  1128. #define JET_wrnMuchDataChanged 1614 /* Repaint whole datasheet */
  1129. #define JET_errIncorrectJoinKey -1615 /* Master key does not match lookup key */
  1130. #define JET_wrnKeyChanged 1618 /* Moved to new key */
  1131. #define JET_wrnSyncedToDelRec 1699 /* CONSIDER: QJET INTERNAL */
  1132. #define JET_errRedoPrepUpdate 1698 /* CONSIDER: QJET INTERNAL(jpbulk.c)*/
  1133. #define JET_errTooManySorts -1701 /* Too many sort processes */
  1134. #define JET_errInvalidOnSort -1702 /* Invalid operation on Sort */
  1135. #define JET_errConfigOpenError -1801 /* Config. file can't be opened */
  1136. #define JET_errSysDatabaseOpenError -1802 /* System db could not be opened */
  1137. #define JET_errTempFileOpenError -1803 /* Temp file could not be opened */
  1138. #define JET_errDatabaseOpenError -1804 /* Database file can't be opened */
  1139. #define JET_errTooManyAttachedDatabases -1805 /* Too many open databases */
  1140. #define JET_errDatabaseCloseError -1806 /* Db file could not be closed */
  1141. #define JET_errTooManyOpenFiles -1807 /* Too many files open */
  1142. #define JET_errDiskFull -1808 /* No space left on disk */
  1143. #define JET_errPermissionDenied -1809 /* Permission denied */
  1144. #define JET_errSortFileOpenError -1810 /* Could not open sort file */
  1145. #define JET_errFileNotFound -1811 /* File not found */
  1146. #define JET_errTempDiskFull -1812 /* No space left on disk */
  1147. #define JET_wrnFileOpenReadOnly 1813 /* Database file is read only */
  1148. #define JET_errAfterInitialization -1850 /* Cannot Restore after init. */
  1149. #define JET_errSeriesTooLong -1851 /* New log generation id too big */
  1150. #define JET_errLogCorrupted -1852 /* Logs could not be interpreted */
  1151. #define JET_errCannotOpenSystemDb -1901 /* failed sysdb on beginsession */
  1152. #define JET_errInvalidLogon -1902 /* invalid logon at beginsession */
  1153. #define JET_errInvalidAccountName -1903 /* invalid account name */
  1154. #define JET_errInvalidSid -1904 /* invalid SID */
  1155. #define JET_errInvalidPassword -1905 /* invalid password */
  1156. #define JET_errInvalidOperation -1906 /* invalid operation */
  1157. #define JET_errAccessDenied -1907 /* access denied */
  1158. #define JET_errNoMSysAccounts -1908 /* Can't open MSysAccounts */
  1159. #define JET_errNoMSysGroups -1909 /* Can't open MSysGroups */
  1160. #define JET_errInvalidPin -1910 /* invalid pin */
  1161. #define JET_errRmtSqlError -2001 /* RMT: ODBC call failed */
  1162. #define JET_errRmtMissingOdbcDll -2006 /* RMT: Can't load ODBC DLL */
  1163. #define JET_errRmtInsertFailed -2007 /* RMT: Insert statement failed */
  1164. #define JET_errRmtDeleteFailed -2008 /* RMT: Delete statement failed */
  1165. #define JET_errRmtUpdateFailed -2009 /* RMT: Update statement failed */
  1166. #define JET_errRmtColDataTruncated -2010 /* RMT: data truncated */
  1167. #define JET_errRmtTypeIncompat -2011 /* RMT: Can't create JET type on server */
  1168. #define JET_errRmtCreateTableFailed -2012 /* RMT: Create table stmt failed */
  1169. #define JET_errRmtNotSupported -2014 /* RMT: Function not legal for rdb */
  1170. #define JET_errRmtValueOutOfRange -2020 /* RMT: Data value out of range */
  1171. #define JET_errRmtStillExec -2021 /* RMT INTERNAL: SQL_STILL_EXECUTING */
  1172. #define JET_errRmtQueryTimeout -2022 /* RMT: Server Not Responding */
  1173. #define JET_wrnRmtNeedLvData 2023 /* RMT: Internal only - need Lv data */
  1174. #define JET_wrnFatCursorUseless 2024 /* Fat cursor has no effect ***/
  1175. #define JET_errRmtWrongSPVer -2025 /* RMT: INTERNAL: wrong SProc ver ***/
  1176. #define JET_errRmtLinkOutOfSync -2026 /* RMT: the def for the rmt tbl has changed */
  1177. #define JET_errRmtDenyWriteIsInvalid -2027 /* RMT: Can't open DenyWrite */
  1178. #define JET_errRmtDriverCantConv -2029 /* RMT: INTERNAL: driver cannot convert */
  1179. #define JET_errRmtTableAmbiguous -2030 /* RMT: Table ambiguous: must specifier owner */
  1180. #define JET_errRmtBogusConnStr -2031 /* RMT: SPT: Bad connect string */
  1181. #define JET_errQueryInvalidAttribute -3001 /* Invalid query attribute */
  1182. #define JET_errQueryOnlyOneRow -3002 /* Only 1 such row allowed */
  1183. #define JET_errQueryIncompleteRow -3003 /* Missing value in row */
  1184. #define JET_errQueryInvalidFlag -3004 /* Invalid value in Flag field */
  1185. #define JET_errQueryCycle -3005 /* Cycle in query definition */
  1186. #define JET_errQueryInvalidJoinTable -3006 /* Invalid table in join */
  1187. #define JET_errQueryAmbigRef -3007 /* Ambiguous column reference */
  1188. #define JET_errQueryUnboundRef -3008 /* Cannot bind name */
  1189. #define JET_errQueryParmRedef -3009 /* Parm redefined with different type */
  1190. #define JET_errQueryMissingParms -3010 /* Too few parameters supplied */
  1191. #define JET_errQueryInvalidOutput -3011 /* Invalid query output */
  1192. #define JET_errQueryInvalidHaving -3012 /* HAVING clause without aggregation */
  1193. #define JET_errQueryDuplicateAlias -3013 /* Duplicate output alias */
  1194. #define JET_errQueryInvalidMGBInput -3014 /* Cannot input from MGB */
  1195. #define JET_errQueryInvalidOrder -3015 /* Invalid ORDER BY expression */
  1196. #define JET_errQueryTooManyLevels -3016 /* Too many levels on MGB */
  1197. #define JET_errQueryMissingLevel -3017 /* Missing intermediate MGB level */
  1198. #define JET_errQueryIllegalAggregate -3018 /* Aggregates not allowed */
  1199. #define JET_errQueryDuplicateOutput -3019 /* Duplicate destination output */
  1200. #define JET_errQueryIsBulkOp -3020 /* Grbit should be set for Bulk Operation */
  1201. #define JET_errQueryIsNotBulkOp -3021 /* Query is not a Bulk Operation */
  1202. #define JET_errQueryIllegalOuterJoin -3022 /* No inconsistent updates on outer joins */
  1203. #define JET_errQueryNullRequired -3023 /* Column must be NULL */
  1204. #define JET_errQueryNoOutputs -3024 /* Query must have an output */
  1205. #define JET_errQueryNoInputTables -3025 /* Query must have an input */
  1206. #define JET_wrnQueryNonUpdatableRvt 3026 /* Query is not updatable (but IS RVT) */
  1207. #define JET_errQueryInvalidAlias -3027 /* Bogus character in alias name */
  1208. #define JET_errQueryInvalidBulkInput -3028 /* Cannot input from bulk operation */
  1209. #define JET_errQueryNotDirectChild -3029 /* T.* must use direct child */
  1210. #define JET_errQueryExprEvaluation -3030 /* Expression evaluation error */
  1211. #define JET_errQueryIsNotRowReturning -3031 /* Query does not return rows */
  1212. #define JET_wrnQueryNonRvt 3032 /* Can't create RVT, query is static */
  1213. #define JET_errQueryParmTypeMismatch -3033 /* Wrong parameter type given */
  1214. #define JET_errQueryChanging -3034 /* Query Objects are being updated */
  1215. #define JET_errQueryNotUpdatable -3035 /* Operation must use an updatable query */
  1216. #define JET_errQueryMissingColumnName -3036 /* Missing destination column */
  1217. #define JET_errQueryTableDuplicate -3037 /* Repeated table name in FROM list */
  1218. #define JET_errQueryIsMGB -3038 /* Query is an MGB */
  1219. #define JET_errQueryInsIntoBulkMGB -3039 /* Cannot insert into Bulk/MGB */
  1220. #define JET_errQueryDistinctNotAllowed -3040 /* DISTINCT not allowed for MGB */
  1221. #define JET_errQueryDistinctRowNotAllow -3041 /* DISTINCTROW not allowed for MGB */
  1222. #define JET_errQueryNoDbForParmDestTbl -3045 /* Dest DB for VT parm not allowed */
  1223. #define JET_errQueryDuplicatedFixedSet -3047 /* Duplicated Fixed Value */
  1224. #define JET_errQueryNoDeleteTables -3048 /* Must specify tables to delete from */
  1225. #define JET_errQueryCannotDelete -3049 /* Cannot delete from specified tables */
  1226. #define JET_errQueryTooManyGroupExprs -3050 /* Too many GROUP BY expressions */
  1227. #define JET_errQueryTooManyOrderExprs -3051 /* Too many ORDER BY expressions */
  1228. #define JET_errQueryTooManyDistExprs -3052 /* Too many DISTINCT output expressions */
  1229. #define JET_errQueryBadValueList -3053 /* Malformed value list in Transform */
  1230. #define JET_errConnStrTooLong -3054 /* Connect string too long */
  1231. #define JET_errQueryInvalidParm -3055 /* Invalid Parmeter Name (>64 char) */
  1232. #define JET_errQueryContainsDbParm -3056 /* Can't get parameters with Db Parm */
  1233. #define JET_errQueryBadUpwardRefed -3057 /* Illegally Upward ref'ed */
  1234. #define JET_errQueryAmbiguousJoins -3058 /* Joins in a QO are ambiguous */
  1235. #define JET_errQueryIsNotDDL -3059 /* Not a DDL Operation */
  1236. #define JET_errNoDbInConnStr -3060 /* No database in connect string */
  1237. #define JET_wrnQueryIsNotRowReturning 3061 /* Not row returning */
  1238. #define JET_errTooManyFindSessions -3062 /* RVT already has a find session open */
  1239. #define JET_errSingleValueExpected -3063 /* At most one record with one column can be returned from a scalar subquery */
  1240. #define JET_errColumnCountMismatch -3064 /* Union Query: number of columns in children dont match */
  1241. #define JET_errQueryTopNotAllowed -3065 /* Top not allowed for MGB */
  1242. #define JET_errQueryIsDDL -3066 /* Must set JET_bitTableDDL */
  1243. #define JET_errQueryIsCorrupt -3067 /* Query is Corrupt */
  1244. #define JET_errQuerySPTBulkSucceeded -3068 /* INTERNAL only */
  1245. #define JET_errSPTReturnedNoRecords -3069 /* SPT marked as RowReturning did not return a table */
  1246. #define JET_errExprSyntax -3100 /* Syntax error in expression */
  1247. #define JET_errExprIllegalType -3101 /* Illegal type in expression */
  1248. #define JET_errExprUnknownFunction -3102 /* Unknown function in expression */
  1249. #define JET_errSQLSyntax -3500 /* Bogus SQL statement type */
  1250. #define JET_errSQLParameterSyntax -3501 /* Parameter clause syntax error */
  1251. #define JET_errSQLInsertSyntax -3502 /* INSERT clause syntax error */
  1252. #define JET_errSQLUpdateSyntax -3503 /* UPDATE clause syntax error */
  1253. #define JET_errSQLSelectSyntax -3504 /* SELECT clause syntax error */
  1254. #define JET_errSQLDeleteSyntax -3505 /* Expected 'FROM' after 'DELETE' */
  1255. #define JET_errSQLFromSyntax -3506 /* FROM clause syntax error */
  1256. #define JET_errSQLGroupBySyntax -3507 /* GROUP BY clause syntax error */
  1257. #define JET_errSQLOrderBySyntax -3508 /* ORDER BY clause syntax error */
  1258. #define JET_errSQLLevelSyntax -3509 /* LEVEL syntax error */
  1259. #define JET_errSQLJoinSyntax -3510 /* JOIN syntax error */
  1260. #define JET_errSQLTransformSyntax -3511 /* TRANSFORM syntax error */
  1261. #define JET_errSQLHavingSyntax -3512 /* HAVING clause syntax error */
  1262. #define JET_errSQLWhereSyntax -3513 /* WHERE clause syntax error */
  1263. #define JET_errSQLProcedureSyntax -3514 /* Expected query name after 'PROCEDURE' */
  1264. #define JET_errSQLNotEnoughBuf -3515 /* Buffer too small for SQL string */
  1265. #define JET_errSQLMissingSemicolon -3516 /* Missing ; at end of SQL statement */
  1266. #define JET_errSQLTooManyTokens -3517 /* Characters after end of SQL statement */
  1267. #define JET_errSQLOwnerAccessSyntax -3518 /* OWNERACCESS OPTION syntax error */
  1268. #define JET_errV11NotSupported -3519 /* not supported in V11 */
  1269. #define JET_errV10Format -3520 /* can be present in V10 format only */
  1270. #define JET_errSQLUnionSyntax -3521 /* UNION query syntax error */
  1271. #define JET_errSqlPassThrough -3523 /* Pass Through query Disallowed */
  1272. #define JET_wrnSqlPassThrough 3524 /* Pass Through query involved */
  1273. #define JET_errDDLConstraintSyntax -3550 /* constraint syntax error */
  1274. #define JET_errDDLCreateTableSyntax -3551 /* create table syntax error */
  1275. #define JET_errDDLCreateIndexSyntax -3552 /* create index syntax error */
  1276. #define JET_errDDLColumnDefSyntax -3553 /* column def syntax error */
  1277. #define JET_errDDLAlterTableSyntax -3554 /* alter table syntax error */
  1278. #define JET_errDDLDropIndexSyntax -3555 /* drop index syntax error */
  1279. #define JET_errDDLDropSyntax -3556 /* drop view/procedure syntax error */
  1280. #define JET_errDDLCreateViewSyntax -3557 /* create view syntax error */
  1281. #define JET_errNoSuchProperty -3600 /* Property was not found */
  1282. #define JET_errPropertyTooLarge -3601 /* Small Property larger than 2K */
  1283. #define JET_errJPMInvalidForV1x -3602 /* No JPM for V1.x databases */
  1284. #define JET_errPropertyExists -3603 /* Property already exists */
  1285. #define JET_errInvalidDelete -3604 /* DeleteOnly called with non-zero cbData */
  1286. #define JET_wrnFindWrapped 3700 /* Cursor wrapped during fast find */
  1287. #define JET_errTLVNativeUserTablesOnly -3700 /* TLVs can only be placed on native user tables/columns */
  1288. #define JET_errTLVNoNull -3701 /* This field cannot be null */
  1289. #define JET_errTLVNoBlank -3702 /* This column cannot be blank */
  1290. #define JET_errTLVRuleViolation -3703 /* This validation rule must be met */
  1291. #define JET_errTLVInvalidColumn -3704 /* This TLV property cannot be placed on this column */
  1292. #define JET_errTLVExprEvaluation -3705 /* Expression evaluation error */
  1293. #define JET_errTLVExprUnknownFunc -3706 /* Unknown function in TLV expression */
  1294. #define JET_errTLVExprSyntax -3707 /* Syntax error in TLV expression */
  1295. /* CONSIDER: Remove the following error. */
  1296. #define JET_errGeneral -5001 /* I-ISAM: assert failure */
  1297. #define JET_errRecordLocked -5002 /* I-ISAM: record locked */
  1298. #define JET_wrnColumnDataTruncated 5003 /* I-ISAM: data truncated */
  1299. #define JET_errTableNotOpen -5004 /* I-ISAM: table is not open */
  1300. #define JET_errDecryptFail -5005 /* I-ISAM: incorrect password */
  1301. #define JET_wrnCurrencyLost 5007 /* I-ISAM: currency lost - must first/last */
  1302. #define JET_errDateOutOfRange -5008 /* I-ISAM: invalid date */
  1303. #define JET_wrnOptionsIgnored 5011 /* I-ISAM: options were ignored */
  1304. #define JET_errTableNotComplete -5012 /* I-ISAM: incomplete table definition */
  1305. #define JET_errIllegalNetworkOption -5013 /* I-ISAM: illegal network option */
  1306. #define JET_errIllegalTimeoutOption -5014 /* I-ISAM: illegal timeout option */
  1307. #define JET_errNotExternalFormat -5015 /* I-ISAM: invalid file format */
  1308. #define JET_errUnexpectedEngineReturn -5016 /* I-ISAM: unexpected engine error code */
  1309. #define JET_errNumericFieldOverflow -5017 /* I-ISAM: can't convert to native type */
  1310. #define JET_errIndexHasNoPrimary -5020 /* Paradox: no primary index */
  1311. #define JET_errTableSortOrderMismatch -5021 /* Paradox: sort order mismatch */
  1312. #define JET_errNoConfigParameters -5023 /* Paradox: net path or user name missing */
  1313. #define JET_errCantAccessParadoxNetDir -5024 /* Paradox: bad Paradox net path */
  1314. #define JET_errObsoleteLockFile -5025 /* Paradox: obsolete lock file */
  1315. #define JET_errIllegalCollatingSequence -5026 /* Paradox: invalid sort sequence */
  1316. #define JET_errWrongCollatingSequence -5027 /* Paradox: wrong sort sequence */
  1317. #define JET_errCantUseUnkeyedTable -5028 /* Paradox: can't open unkeyed table */
  1318. #define JET_errINFFileError -5101 /* dBase: invalid .INF file */
  1319. #define JET_errCantMakeINFFile -5102 /* dBase: can't open .INF file */
  1320. #define JET_wrnCantMaintainIndex 5103 /* dBase: unmaintainable index */
  1321. #define JET_errMissingMemoFile -5104 /* dBase: missing memo file */
  1322. #define JET_errIllegalCenturyOption -5105 /* dBase: Illegal century option */
  1323. #define JET_errIllegalDeletedOption -5106 /* dBase: Illegal deleted option */
  1324. #define JET_errIllegalStatsOption -5107 /* dBase: Illegal statistics option */
  1325. #define JET_errIllegalDateOption -5108 /* dBase: Illegal date option */
  1326. #define JET_errIllegalMarkOption -5109 /* dBase: Illegal mark option */
  1327. #define JET_wrnDuplicateIndexes 5110 /* dBase: duplicate indexes in INF file */
  1328. #define JET_errINFIndexNotFound -5111 /* dBase: missing index in INF file */
  1329. #define JET_errWrongMemoFileType -5112 /* dBase: wrong memo file type */
  1330. #define JET_errIllegalExactOption -5113 /* dBase: Illegal exact option */
  1331. #define JET_errTooManyLongFields -5200 /* Btrieve: more than one memo field */
  1332. #define JET_errCantStartBtrieve -5201 /* Btrieve: wbtrcall.dll missing */
  1333. #define JET_errBadConfigParameters -5202 /* Btrieve: win.ini [btrieve] options wrong */
  1334. #define JET_errIndexesChanged -5203 /* Btrieve: need to GetIndexInfo */
  1335. #define JET_errNonModifiableKey -5204 /* Btrieve: can't modify record column */
  1336. #define JET_errOutOfBVResources -5205 /* Btrieve: out of resources */
  1337. #define JET_errBtrieveDeadlock -5206 /* Btrieve: locking deadlock */
  1338. #define JET_errBtrieveFailure -5207 /* Btrieve: Btrieve DLL failure */
  1339. #define JET_errBtrieveDDCorrupted -5208 /* Btrieve: data dictionary corrupted */
  1340. #define JET_errBtrieveTooManyTasks -5209 /* Btrieve: too many tasks */
  1341. #define JET_errIllegalIndexDDFOption -5210 /* Btrieve: Illegal IndexDDF option */
  1342. #define JET_errIllegalDataCodePage -5211 /* Btrieve: Illeagl DataCodePage option */
  1343. #define JET_errXtrieveEnvironmentError -5212 /* Btrieve: Xtrieve INI options bad */
  1344. #define JET_errMissingDDFFile -5213 /* Btrieve: Missing field.ddf */
  1345. #define JET_errIlleaglIndexNumberOption -5214 /* Btrieve: Illeagl IndexRenumber option */
  1346. /* Extended error codes must be in the following range. */
  1347. /* Major error codes may not be in this range. */
  1348. #define JET_errMinorLeast -8000
  1349. #define JET_errMinorMost -8999
  1350. #define JET_errFindExprSyntax -8001 /* Syntax error in FastFind expression */
  1351. #define JET_errQbeExprSyntax -8002 /* Syntax error in QBE expression */
  1352. #define JET_errInputTableNotFound -8003 /* Non-existant object in FROM list */
  1353. #define JET_errQueryExprSyntax -8004 /* Syntax error in some query expression */
  1354. #define JET_errQodefExprSyntax -8005 /* Syntax error in expression column */
  1355. #define JET_errExpAliasAfterAS -8006 /* Expected alias after 'AS' in FROM list */
  1356. #define JET_errExpBYAfterGROUP -8007 /* Expected 'BY' after 'GROUP' */
  1357. #define JET_errExpBYAfterORDER -8008 /* Expected 'BY' after 'ORDER' */
  1358. #define JET_errExpClsParenAfterColList -8009 /* Expected ')' after column list */
  1359. #define JET_errExpColNameAfterPIVOT -8010 /* Expected column name after 'PIVOT' */
  1360. #define JET_errExpDatabaseAfterIN -8011 /* Expected database name after 'IN' */
  1361. #define JET_errExpDatatypeAfterParmName -8012 /* Expected datatype after parameter name */
  1362. #define JET_errExpEqualAfterUpdColName -8013 /* Expected '=' after update column name */
  1363. #define JET_errExpExprAfterON -8014 /* Expected join expression after 'ON' */
  1364. #define JET_errExpExprAfterTRANSFORM -8015 /* Expected expression after 'TRANSFORM' */
  1365. #define JET_errExpExprAfterWHERE -8016 /* Expected expression after 'WHERE' */
  1366. #define JET_errExpGroupClauseInXform -8017 /* Transform expects GROUP BY clause */
  1367. #define JET_errExpGroupingExpr -8018 /* Expected grouping expression */
  1368. #define JET_errExpHavingExpr -8019 /* Expected HAVING expression */
  1369. #define JET_errExpINTOAfterINSERT -8020 /* Expected 'INTO' after 'INSERT' */
  1370. #define JET_errExpJOINAfterJoinType -8021 /* Expected 'JOIN' after INNER/LEFT/RIGHT */
  1371. #define JET_errExpLEVELAfterSelectList -8022 /* Expected LEVEL after select list */
  1372. #define JET_errExpNumberAfterLEVEL -8023 /* Expected number after 'LEVEL' */
  1373. #define JET_errExpONAfterRightTable -8024 /* Expected 'ON' after right join table */
  1374. #define JET_errExpOrderExpr -8025 /* Expected ordering expression */
  1375. #define JET_errExpOutputAliasAfterAS -8026 /* Expected output alias after 'AS' */
  1376. #define JET_errExpOutputExpr -8027 /* Expected output expression */
  1377. #define JET_errExpPIVOTAfterSelectStmt -8028 /* Expected 'PIVOT' after SELECT statement */
  1378. #define JET_errExpRightJoinTable -8029 /* Expected right join table after 'JOIN' */
  1379. #define JET_errExpSELECTAfterInsClause -8030 /* Expected 'SELECT' after INSERT clause */
  1380. #define JET_errExpSELECTAfterXformExpr -8031 /* Expected 'SELECT' after Transform fact */
  1381. #define JET_errExpSETAfterTableName -8032 /* Expected 'SET' after table name */
  1382. #define JET_errExpSemiAfterLevelNumber -8033 /* Expected ';' after level number */
  1383. #define JET_errExpSemiAfterParmList -8034 /* Expected ';' after parmeter list */
  1384. #define JET_errExpSemiAfterPivotClause -8035 /* Expected ';' after PIVOT clause */
  1385. #define JET_errExpSemiAtEndOfSQL -8036 /* Expected ';' at end of SQL statement */
  1386. #define JET_errExpTableName -8037 /* Expected table name */
  1387. #define JET_errExpTableNameAfterINTO -8038 /* Expected table name after 'INTO' */
  1388. #define JET_errExpUpdExprAfterEqual -8039 /* Expected update expression after '=' */
  1389. #define JET_errExpUpdateColName -8040 /* Expected update column name */
  1390. #define JET_errInvTokenAfterFromList -8041 /* Bogus token after FROM list */
  1391. #define JET_errInvTokenAfterGroupList -8042 /* Bogus token after GROUP BY list */
  1392. #define JET_errInvTokenAfterHavingCls -8043 /* Bogus token after HAVING clause */
  1393. #define JET_errInvTokenAfterOrderClause -8044 /* Bogus token after ORDER BY clause */
  1394. #define JET_errInvTokenAfterSelectCls -8045 /* Bogus token after SELECT clause */
  1395. #define JET_errInvTokenAfterWhereClause -8046 /* Bogus token after WHERE clause */
  1396. #define JET_errLevelNumberTooBig -8047 /* Number after 'LEVEL' too big */
  1397. #define JET_errLevelOnNonMGB -8048 /* LEVEL allowed only in MGB */
  1398. #define JET_errIllegalDetailReference -8049 /* Not group key or agg, but not MGB detail */
  1399. #define JET_errAggOverMixedLevels -8050 /* Agg. arg. uses outputs from > 1 level */
  1400. #define JET_errAggregatingHigherLevel -8051 /* Agg. over output of same/higher level */
  1401. #define JET_errNullInJoinKey -8052 /* Cannot set column in join key to NULL */
  1402. #define JET_errValueBreaksJoin -8053 /* Join is broken by column value(s) */
  1403. #define JET_errInsertIntoUnknownColumn -8054 /* INSERT INTO unknown column name */
  1404. #define JET_errNoSelectIntoColumnName -8055 /* No dest. col. name in SELECT INTO stmt */
  1405. #define JET_errNoInsertColumnName -8056 /* No dest. col. name in INSERT stmt */
  1406. #define JET_errColumnNotInJoinTable -8057 /* Join expr refers to non-join table */
  1407. #define JET_errAggregateInJoin -8058 /* Aggregate in JOIN clause */
  1408. #define JET_errAggregateInWhere -8059 /* Aggregate in WHERE clause */
  1409. #define JET_errAggregateInOrderBy -8060 /* Aggregate in ORDER BY clause */
  1410. #define JET_errAggregateInGroupBy -8061 /* Aggregate in GROUP BY clause */
  1411. #define JET_errAggregateInArgument -8062 /* Aggregate in argument expression */
  1412. #define JET_errHavingOnTransform -8063 /* HAVING clause on TRANSFORM query */
  1413. #define JET_errHavingWithoutGrouping -8064 /* HAVING clause w/o grouping/aggregation */
  1414. #define JET_errHavingOnMGB -8065 /* HAVING clause on MGB query */
  1415. #define JET_errOutputAliasCycle -8066 /* Cycle in SELECT list (via aliases) */
  1416. #define JET_errDotStarWithGrouping -8067 /* 'T.*' with grouping, but not MGB level 0 */
  1417. #define JET_errStarWithGrouping -8068 /* '*' with grouping, but not MGB detail */
  1418. #define JET_errQueryTreeCycle -8069 /* Cycle in tree of query objects */
  1419. #define JET_errTableRepeatInFromList -8072 /* Table appears twice in FROM list */
  1420. #define JET_errTooManyXformLevels -8073 /* Level > 2 in TRANSFORM query */
  1421. #define JET_errTooManyMGBLevels -8074 /* Too many levels in MGB */
  1422. #define JET_errNoUpdateColumnName -8075 /* No dest. column name in UPDATE stmt */
  1423. #define JET_errJoinTableNotInput -8076 /* Join table not in FROM list */
  1424. #define JET_errUnaliasedSelfJoin -8077 /* Join tables have same name */
  1425. #define JET_errOutputLevelTooBig -8078 /* Output w/ level > 1+max group level */
  1426. #define JET_errOrderVsGroup -8079 /* ORDER BY conflicts with GROUP BY */
  1427. #define JET_errOrderVsDistinct -8080 /* ORDER BY conflicts with DISTINCT */
  1428. #define JET_errExpLeftParenthesis -8082 /* Expected '(' */
  1429. #define JET_errExpRightParenthesis -8083 /* Expected ')' */
  1430. #define JET_errEvalEBESErr -8084 /* EB/ES error evaluating expression */
  1431. #define JET_errQueryExpCloseQuote -8085 /* Unmatched quote for database name */
  1432. #define JET_errQueryParmNotDatabase -8086 /* Parameter type should be database */
  1433. #define JET_errQueryParmNotTableid -8087 /* Parameter type should be tableid */
  1434. #define JET_errExpIdentifierM -8088 /* Expected identifier */
  1435. #define JET_errExpQueryName -8089 /* Expected query name after PROCEDURE */
  1436. #define JET_errExprUnknownFunctionM -8090 /* Unknown function in expression */
  1437. #define JET_errQueryAmbigRefM -8091 /* Ambiguous column reference */
  1438. #define JET_errQueryBadBracketing -8092 /* Bad bracketing of identifier */
  1439. #define JET_errQueryBadQodefName -8093 /* Invalid name in QODEF row */
  1440. #define JET_errQueryBulkColNotUpd -8094 /* Column not updatable (bulk op) */
  1441. #define JET_errQueryDistinctNotAllowedM -8095 /* DISTINCT not allowed for MGB */
  1442. #define JET_errQueryDuplicateAliasM -8096 /* Duplicate output alias */
  1443. #define JET_errQueryDuplicateOutputM -8097 /* Duplicate destination output */
  1444. #define JET_errQueryDuplicatedFixedSetM -8098 /* Duplicated Fixed Value */
  1445. #define JET_errQueryIllegalOuterJoinM -8099 /* No inconsistent updates on outer joins */
  1446. #define JET_errQueryIncompleteRowM -8100 /* Missing value in row */
  1447. #define JET_errQueryInvalidAttributeM -8101 /* Invalid query attribute */
  1448. #define JET_errQueryInvalidBulkInputM -8102 /* Cannot input from bulk operation */
  1449. #define JET_errQueryInvalidFlagM -8103 /* Invalid value in Flag field */
  1450. #define JET_errQueryInvalidMGBInputM -8104 /* Cannot input from MGB */
  1451. #define JET_errQueryLVInAggregate -8105 /* Illegal long value in aggregate */
  1452. #define JET_errQueryLVInDistinct -8106 /* Illegal long value in DISTINCT */
  1453. #define JET_errQueryLVInGroupBy -8107 /* Illegal long value in GROUP BY */
  1454. #define JET_errQueryLVInHaving -8108 /* Illegal long value in HAVING */
  1455. #define JET_errQueryLVInJoin -8109 /* Illegal long value in JOIN */
  1456. #define JET_errQueryLVInOrderBy -8110 /* Illegal long value in ORDER BY */
  1457. #define JET_errQueryMissingLevelM -8111 /* Missing intermediate MGB level */
  1458. #define JET_errQueryMissingParmsM -8112 /* Too few parameters supplied */
  1459. #define JET_errQueryNoDbForParmDestTblM -8113 /* Dest DB for VT parm not allowed */
  1460. #define JET_errQueryNoDeletePerm -8114 /* No delete permission on table/query */
  1461. #define JET_errQueryNoInputTablesM -8115 /* Query must have an input */
  1462. #define JET_errQueryNoInsertPerm -8116 /* No insert permission on table/query */
  1463. #define JET_errQueryNoOutputsM -8117 /* Query must have an output */
  1464. #define JET_errQueryNoReadDefPerm -8118 /* No permission to read query definition */
  1465. #define JET_errQueryNoReadPerm -8119 /* No read permission on table/query */
  1466. #define JET_errQueryNoReplacePerm -8120 /* No replace permission on table/query */
  1467. #define JET_errQueryNoTblCrtPerm -8121 /* No CreateTable permission (bulk op) */
  1468. #define JET_errQueryNotDirectChildM -8122 /* T.* must use direct child */
  1469. #define JET_errQueryNullRequiredM -8123 /* Column must be NULL */
  1470. #define JET_errQueryOnlyOneRowM -8124 /* Only 1 such row allowed */
  1471. #define JET_errQueryOutputColNotUpd -8125 /* Query output column not updatable */
  1472. #define JET_errQueryParmRedefM -8126 /* Parm redefined with different type */
  1473. #define JET_errQueryParmTypeMismatchM -8127 /* Wrong parameter type given */
  1474. #define JET_errQueryUnboundRefM -8128 /* Cannot bind name */
  1475. #define JET_errRmtConnectFailedM -8129 /* RMT: Connection attempt failed */
  1476. #define JET_errRmtDeleteFailedM -8130 /* RMT: Delete statement failed */
  1477. #define JET_errRmtInsertFailedM -8131 /* RMT: Insert statement failed */
  1478. #define JET_errRmtMissingOdbcDllM -8132 /* RMT: Can't load ODBC DLL */
  1479. #define JET_errRmtSqlErrorM -8133 /* RMT: ODBC call failed */
  1480. #define JET_errRmtUpdateFailedM -8134 /* RMT: Update statement failed */
  1481. #define JET_errSQLDeleteSyntaxM -8135 /* Expected 'FROM' after 'DELETE' */
  1482. #define JET_errSQLSyntaxM -8136 /* Bogus SQL statement type */
  1483. #define JET_errSQLTooManyTokensM -8137 /* Characters after end of SQL statement */
  1484. #define JET_errStarNotAtLevel0 -8138 /* '*' illegal above level 0 */
  1485. #define JET_errQueryParmTypeNotAllowed -8139 /* Parameter type not allowed for expression */
  1486. #define JET_errQueryTooManyDestColumn -8142 /* Too many destination column sepcified */
  1487. #define JET_errSQLNoInsertColumnName -8143 /* No dest. col. name in INSERT stmt */
  1488. #define JET_errRmtLinkNotFound -8144 /* RMT: link not found */
  1489. #define JET_errRmtTooManyColumns -8145 /* RMT: Too many columns on Select Into */
  1490. #define JET_errWriteConflictM -8146 /* Write lock failed due to outstanding write lock */
  1491. #define JET_errReadConflictM -8147 /* Commit lock failed due to outstanding read lock */
  1492. #define JET_errCommitConflictM -8148 /* Read lock failed due to outstanding commit lock */
  1493. #define JET_errTableLockedM -8149 /* Table is exclusively locked */
  1494. #define JET_errTableInUseM -8150 /* Table is in use, cannot lock */
  1495. #define JET_errQueryTooManyXvtColumn -8151 /* Too many cross table column headers */
  1496. #define JET_errOutputTableNotFound -8152 /* Non-existent table in Insert Into */
  1497. #define JET_errTableLockedQM -8153 /* Table is exclusively locked */
  1498. #define JET_errTableInUseQM -8154 /* Table is in use, cannot lock */
  1499. #define JET_errTableLockedMUQM -8155 /* Table is exclusively locked */
  1500. #define JET_errTableInUseMUQM -8156 /* Table is in use, cannot lock */
  1501. #define JET_errQueryInvalidParmM -8157 /* Invalid Parmeter Name (>64 char) */
  1502. #define JET_errFileNotFoundM -8158 /* File not found */
  1503. #define JET_errFileShareViolationM -8159 /* File sharing violation */
  1504. #define JET_errFileAccessDeniedM -8160 /* Access denied */
  1505. #define JET_errInvalidPathM -8161 /* Invalid Path */
  1506. #define JET_errTableDuplicateM -8162 /* Table already exists */
  1507. #define JET_errQueryBadUpwardRefedM -8163 /* Illegally Upward ref'ed */
  1508. #define JET_errIntegrityViolMasterM -8164 /* References to key exist */
  1509. #define JET_errIntegrityViolSlaveM -8165 /* No referenced key exists */
  1510. #define JET_errSQLUnexpectedWithM -8166 /* Unexpected 'with' in this place */
  1511. #define JET_errSQLOwnerAccessM -8167 /* Owner Access Option is defined Twice */
  1512. #define JET_errSQLOwnerAccessSyntaxM -8168 /* Owner Access Option Syntax Error */
  1513. #define JET_errSQLOwnerAccessDef -8169 /* Owner Access Option is defined more than once */
  1514. #define JET_errAccessDeniedM -8170 /* Generic Access Denied */
  1515. #define JET_errUnexpectedEngineReturnM -8171 /* I-ISAM: unexpected engine error code */
  1516. #define JET_errQueryTopNotAllowedM -8172 /* Top not allowed for MGB */
  1517. #define JET_errInvTokenAfterTableCls -8173 /* Bogus token after table clause */
  1518. #define JET_errInvTokenAfterRParen -8174 /* Unexpected tokens after a closing paren */
  1519. #define JET_errQueryBadValueListM -8175 /* Malformed value list in Transform */
  1520. #define JET_errQueryIsCorruptM -8176 /* Query is Corrupt */
  1521. #define JET_errInvalidTopArgumentM -8177 /* Select Top argument is invalid */
  1522. #define JET_errQueryIsSnapshot -8178 /* Query is a snapshot */
  1523. #define JET_errQueryExprOutput -8179 /* Output is a calculated column */
  1524. #define JET_errQueryTableRO -8180 /* Column comes from read-only table */
  1525. #define JET_errQueryRowDeleted -8181 /* Column comes from deleted row */
  1526. #define JET_errQueryRowLocked -8182 /* Column comes from locked row */
  1527. #define JET_errQueryFixupChanged -8183 /* Would row-fixup away from pending changes */
  1528. #define JET_errQueryCantFillIn -8184 /* Fill-in-the-blank only on most-many */
  1529. #define JET_errQueryWouldOrphan -8185 /* Would orphan joined records */
  1530. #define JET_errIncorrectJoinKeyM -8186 /* Must match join key in lookup table */
  1531. #define JET_errQueryLVInSubqueryM -8187 /* Illegal long value in subquery */
  1532. #define JET_errInvalidDatabaseM -8188 /* Unrecognized database format */
  1533. #define JET_errOrderVsUnion -8189 /* You can only order by an outputted column in a union */
  1534. #define JET_errTLVCouldNotBindRef -8190 /* Unknown token in TLV expression */
  1535. #define JET_errCouldNotBindRef -8191 /* Unknown token in FastFind expression */
  1536. #define JET_errQueryPKeyNotOutput -8192 /* Primary key not output */
  1537. #define JET_errQueryJKeyNotOutput -8193 /* Join key not output */
  1538. #define JET_errExclusiveDBConflict -8194 /* Conflict with exclusive user */
  1539. #define JET_errQueryNoJoinedRecord -8195 /* No F.I.T.B. insert if no joined record */
  1540. #define JET_errQueryLVInSetOp -8196 /* Illegal long value in set operation */
  1541. #define JET_errTLVExprUnknownFunctionM -8197 /* Unknown function in TLV expression */
  1542. #define JET_errInvalidNameM -8198 /* Invalid name */
  1543. #define JET_errDDLExpColName -8200 /* expect column name */
  1544. #define JET_errDDLExpLP -8201 /* expect '(' */
  1545. #define JET_errDDLExpRP -8202 /* expect ')' */
  1546. #define JET_errDDLExpIndex -8203 /* expect INDEX */
  1547. #define JET_errDDLExpIndexName -8204 /* expect index name */
  1548. #define JET_errDDLExpOn -8205 /* expect ON */
  1549. #define JET_errDDLExpKey -8206 /* expect KEY */
  1550. #define JET_errDDLExpReferences -8207 /* expect REFERENCES */
  1551. #define JET_errDDLExpTableName -8208 /* expect table name */
  1552. #define JET_errDDLExpFullOrPartial -8209 /* expect FULL or PARTIAL */
  1553. #define JET_errDDLExpCascadeOrSet -8210 /* expect CASCADE or SET */
  1554. #define JET_errDDLExpNull -8211 /* expect NULL */
  1555. #define JET_errDDLExpUpdateOrDelete -8212 /* expect UPDATE or DELETE */
  1556. #define JET_errDDLExpConstraintName -8213 /* expect constraint name */
  1557. #define JET_errDDLExpForeign -8214 /* expect FOREIGN */
  1558. #define JET_errDDLExpDatatype -8215 /* expect data type */
  1559. #define JET_errDDLExpIndexOpt -8216 /* expect index options */
  1560. #define JET_errDDLExpWith -8217 /* expect WITH */
  1561. #define JET_errDDLExpTable -8218 /* expect TABLE */
  1562. #define JET_errDDLExpEos -8219 /* expect End Of String */
  1563. #define JET_errDDLExpAddOrDrop -8220 /* expect ADD or Drop */
  1564. #define JET_errDDLCreateView -8221 /* Create view not supported */
  1565. #define JET_errDDLCreateProc -8222 /* Create proc not supported */
  1566. #define JET_errDDLExpObjectName -8223 /* expect object name */
  1567. #define JET_errDDLExpColumn -8224 /* expect COLUMN */
  1568. #define JET_errV11TableNameNotInScope -8250 /* referenced table not in join clause */
  1569. #define JET_errV11OnlyTwoTables -8251 /* exactly two tables should be referenced in join */
  1570. #define JET_errV11OneSided -8252 /* all tables come from one side of input */
  1571. #define JET_errV11Ambiguous -8253 /* Join clause is ambiguous when stored in V1 format */
  1572. #define JET_errTLVExprSyntaxM -8260 /* Syntax error in TLV expression */
  1573. #define JET_errTLVNoNullM -8261 /* This field cannot be null */
  1574. #define JET_errTLVNoBlankM -8262 /* This column cannot be blank */
  1575. #define JET_errTLVRuleViolationM -8263 /* This validation rule must be met */
  1576. #define JET_errDDLCreateViewSyntaxM -8264 /* create view syntax error */
  1577. /***********************
  1578. The following error code ranges are reserved for external use.
  1579. As is true for Jet error codes, these ranges cover the negative
  1580. as well as positive form of the numbers in the range.
  1581. 30000 through 30999 for use by Vt Object as defined in jeteb.h
  1582. 32000 through 32767 for use by Import/Export as defined in jetutil.h
  1583. ***********************/
  1584. /**********************************************************************/
  1585. /*********************** PROTOTYPES **************************/
  1586. /**********************************************************************/
  1587. #if !defined(_JET_NOPROTOTYPES)
  1588. /****************************************************************************
  1589. ISAM API
  1590. *****************************************************************************/
  1591. JET_ERR JET_API JetInit(JET_INSTANCE _far *pinstance);
  1592. JET_ERR JET_API JetTerm(JET_INSTANCE instance);
  1593. JET_ERR JET_API JetSetSystemParameter(JET_INSTANCE _far *pinstance, JET_SESID sesid, unsigned long paramid,
  1594. ULONG_PTR lParam, const char _far *sz);
  1595. JET_ERR JET_API JetGetSystemParameter(JET_INSTANCE instance, JET_SESID sesid, unsigned long paramid,
  1596. ULONG_PTR _far *plParam, char _far *sz, unsigned long cbMax);
  1597. JET_ERR JET_API JetGetLastErrorInfo(JET_SESID sesid,
  1598. JET_EXTERR _far *pexterr, unsigned long cbexterrMax,
  1599. char _far *sz1, unsigned long cch1Max,
  1600. char _far *sz2, unsigned long cch2Max,
  1601. char _far *sz3, unsigned long cch3Max,
  1602. unsigned long _far *pcch3Actual);
  1603. JET_ERR JET_API JetBeginSession(JET_INSTANCE instance, JET_SESID _far *psesid,
  1604. const char _far *szUserName, const char _far *szPassword);
  1605. JET_ERR JET_API JetDupSession(JET_SESID sesid, JET_SESID _far *psesid);
  1606. JET_ERR JET_API JetEndSession(JET_SESID sesid, JET_GRBIT grbit);
  1607. JET_ERR JET_API JetGetVersion(JET_SESID sesid, unsigned long _far *pwVersion);
  1608. JET_ERR JET_API JetIdle(JET_SESID sesid, JET_GRBIT grbit);
  1609. JET_ERR JET_API JetCapability(JET_SESID sesid, JET_DBID dbid,
  1610. unsigned long lArea, unsigned long lFunction, JET_GRBIT _far *pgrbit);
  1611. JET_ERR JET_API JetCreateDatabase(JET_SESID sesid,
  1612. const char _far *szFilename, const char _far *szConnect,
  1613. JET_DBID _far *pdbid, JET_GRBIT grbit);
  1614. JET_ERR JET_API JetAttachDatabase(JET_SESID sesid, const char _far *szFilename, JET_GRBIT grbit );
  1615. JET_ERR JET_API JetDetachDatabase(JET_SESID sesid, const char _far *szFilename);
  1616. JET_ERR JET_API JetCreateTable(JET_SESID sesid, JET_DBID dbid,
  1617. const char _far *szTableName, unsigned long lPages, unsigned long lDensity,
  1618. JET_TABLEID _far *ptableid);
  1619. JET_ERR JET_API JetRenameTable(JET_SESID sesid, JET_DBID dbid,
  1620. const char _far *szTableName, const char _far *szTableNew);
  1621. JET_ERR JET_API JetDeleteTable(JET_SESID sesid, JET_DBID dbid,
  1622. const char _far *szTableName);
  1623. JET_ERR JET_API JetGetTableColumnInfo(JET_SESID sesid, JET_TABLEID tableid,
  1624. const char _far *szColumnName, void _far *pvResult, unsigned long cbMax,
  1625. unsigned long InfoLevel);
  1626. JET_ERR JET_API JetGetColumnInfo(JET_SESID sesid, JET_DBID dbid,
  1627. const char _far *szTableName, const char _far *szColumnName,
  1628. void _far *pvResult, unsigned long cbMax, unsigned long InfoLevel);
  1629. JET_ERR JET_API JetAddColumn(JET_SESID sesid, JET_TABLEID tableid,
  1630. const char _far *szColumn, const JET_COLUMNDEF _far *pcolumndef,
  1631. const void _far *pvDefault, unsigned long cbDefault,
  1632. JET_COLUMNID _far *pcolumnid);
  1633. JET_ERR JET_API JetRenameColumn(JET_SESID sesid, JET_TABLEID tableid,
  1634. const char _far *szColumn, const char _far *szColumnNew);
  1635. JET_ERR JET_API JetDeleteColumn(JET_SESID sesid, JET_TABLEID tableid,
  1636. const char _far *szColumn);
  1637. JET_ERR JET_API JetGetTableIndexInfo(JET_SESID sesid, JET_TABLEID tableid,
  1638. const char _far *szIndexName, void _far *pvResult, unsigned long cbResult,
  1639. unsigned long InfoLevel);
  1640. JET_ERR JET_API JetGetTableReferenceInfo(JET_SESID sesid, JET_TABLEID tableid,
  1641. const char _far *szReferenceName, void _far *pvResult,
  1642. unsigned long cbResult, unsigned long InfoLevel);
  1643. JET_ERR JET_API JetGetTableInfo(JET_SESID sesid, JET_TABLEID tableid,
  1644. void _far *pvResult, unsigned long cbMax, unsigned long InfoLevel);
  1645. JET_ERR JET_API JetGetIndexInfo(JET_SESID sesid, JET_DBID dbid,
  1646. const char _far *szTableName, const char _far *szIndexName,
  1647. void _far *pvResult, unsigned long cbResult, unsigned long InfoLevel);
  1648. JET_ERR JET_API JetGetReferenceInfo(JET_SESID sesid, JET_DBID dbid,
  1649. const char _far *szTableName, const char _far *szReference,
  1650. void _far *pvResult, unsigned long cbResult, unsigned long InfoLevel);
  1651. JET_ERR JET_API JetCreateIndex(JET_SESID sesid, JET_TABLEID tableid,
  1652. const char _far *szIndexName, JET_GRBIT grbit,
  1653. const char _far *szKey, unsigned long cbKey, unsigned long lDensity);
  1654. JET_ERR JET_API JetRenameIndex(JET_SESID sesid, JET_TABLEID tableid,
  1655. const char _far *szIndex, const char _far *szIndexNew);
  1656. JET_ERR JET_API JetDeleteIndex(JET_SESID sesid, JET_TABLEID tableid,
  1657. const char _far *szIndexName);
  1658. JET_ERR JET_API JetCreateReference(JET_SESID sesid, JET_TABLEID tableid,
  1659. const char _far *szReferenceName, const char _far *szColumns,
  1660. const char _far *szReferencedTable,
  1661. const char _far *szReferencedColumns, JET_GRBIT grbit);
  1662. JET_ERR JET_API JetRenameReference(JET_SESID sesid, JET_TABLEID tableid,
  1663. const char _far *szReference, const char _far *szReferenceNew);
  1664. JET_ERR JET_API JetDeleteReference(JET_SESID sesid, JET_TABLEID tableid,
  1665. const char _far *szReferenceName);
  1666. JET_ERR JET_API JetGetObjectInfo(JET_SESID sesid, JET_DBID dbid,
  1667. JET_OBJTYP objtyp, const char _far *szContainerName,
  1668. const char _far *szObjectName, void _far *pvResult, unsigned long cbMax,
  1669. unsigned long InfoLevel);
  1670. JET_ERR JET_API JetCreateObject(JET_SESID sesid, JET_DBID dbid,
  1671. const char _far *szContainerName, const char _far *szObjectName,
  1672. JET_OBJTYP objtyp);
  1673. JET_ERR JET_API JetDeleteObject(JET_SESID sesid, JET_DBID dbid,
  1674. const char _far *szContainerName, const char _far *szObjectName);
  1675. JET_ERR JET_API JetRenameObject(JET_SESID sesid, JET_DBID dbid,
  1676. const char _far *szContainerName, const char _far *szObjectName,
  1677. const char _far *szObjectNew);
  1678. JET_ERR JET_API JetBeginTransaction(JET_SESID sesid);
  1679. JET_ERR JET_API JetCommitTransaction(JET_SESID sesid, JET_GRBIT grbit);
  1680. JET_ERR JET_API JetRollback(JET_SESID sesid, JET_GRBIT grbit);
  1681. JET_ERR JET_API JetUpdateUserFunctions(JET_SESID sesid);
  1682. JET_ERR JET_API JetGetDatabaseInfo(JET_SESID sesid, JET_DBID dbid,
  1683. void _far *pvResult, unsigned long cbMax, unsigned long InfoLevel);
  1684. JET_ERR JET_API JetCloseDatabase(JET_SESID sesid, JET_DBID dbid,
  1685. JET_GRBIT grbit);
  1686. JET_ERR JET_API JetCloseTable(JET_SESID sesid, JET_TABLEID tableid);
  1687. JET_ERR JET_API JetOpenDatabase(JET_SESID sesid, const char _far *szFilename,
  1688. const char _far *szConnect, JET_DBID _far *pdbid, JET_GRBIT grbit);
  1689. JET_ERR JET_API JetOpenTable(JET_SESID sesid, JET_DBID dbid,
  1690. const char _far *szTableName, const void _far *pvParameters,
  1691. unsigned long cbParameters, JET_GRBIT grbit, JET_TABLEID _far *ptableid);
  1692. JET_ERR JET_API JetDelete(JET_SESID sesid, JET_TABLEID tableid);
  1693. JET_ERR JET_API JetUpdate(JET_SESID sesid, JET_TABLEID tableid,
  1694. void _far *pvBookmark, unsigned long cbBookmark,
  1695. unsigned long _far *pcbActual);
  1696. JET_ERR JET_API JetRetrieveColumn(JET_SESID sesid, JET_TABLEID tableid,
  1697. JET_COLUMNID columnid, void _far *pvData, unsigned long cbData,
  1698. unsigned long _far *pcbActual, JET_GRBIT grbit, JET_RETINFO _far *pretinfo);
  1699. JET_ERR JET_API JetRetrieveColumns( JET_SESID sesid, JET_TABLEID tableid,
  1700. JET_RETRIEVECOLUMN *pretrievecolumn, unsigned long cretrievecolumn );
  1701. JET_ERR JET_API JetSetColumn(JET_SESID sesid, JET_TABLEID tableid,
  1702. JET_COLUMNID columnid, const void _far *pvData, unsigned long cbData,
  1703. JET_GRBIT grbit, JET_SETINFO _far *psetinfo);
  1704. JET_ERR JET_API JetSetColumns(JET_SESID sesid, JET_TABLEID tableid,
  1705. JET_SETCOLUMN *psetcolumn, unsigned long csetcolumn );
  1706. JET_ERR JET_API JetPrepareUpdate(JET_SESID sesid, JET_TABLEID tableid,
  1707. unsigned long prep);
  1708. JET_ERR JET_API JetGetRecordPosition(JET_SESID sesid, JET_TABLEID tableid,
  1709. JET_RECPOS _far *precpos, unsigned long cbRecpos);
  1710. JET_ERR JET_API JetGotoPosition(JET_SESID sesid, JET_TABLEID tableid,
  1711. JET_RECPOS *precpos );
  1712. JET_ERR JET_API JetGetCursorInfo(JET_SESID sesid, JET_TABLEID tableid,
  1713. void _far *pvResult, unsigned long cbMax, unsigned long InfoLevel);
  1714. JET_ERR JET_API JetDupCursor(JET_SESID sesid, JET_TABLEID tableid,
  1715. JET_TABLEID _far *ptableid, JET_GRBIT grbit);
  1716. JET_ERR JET_API JetGetCurrentIndex(JET_SESID sesid, JET_TABLEID tableid,
  1717. char _far *szIndexName, unsigned long cchIndexName);
  1718. JET_ERR JET_API JetSetCurrentIndex(JET_SESID sesid, JET_TABLEID tableid,
  1719. const char _far *szIndexName);
  1720. JET_ERR JET_API JetMove(JET_SESID sesid, JET_TABLEID tableid,
  1721. long cRow, JET_GRBIT grbit);
  1722. JET_ERR JET_API JetMakeKey(JET_SESID sesid, JET_TABLEID tableid,
  1723. const void _far *pvData, unsigned long cbData, JET_GRBIT grbit);
  1724. JET_ERR JET_API JetSeek(JET_SESID sesid, JET_TABLEID tableid,
  1725. JET_GRBIT grbit);
  1726. JET_ERR JET_API JetFastFind(JET_SESID sesid, JET_DBID dbid,
  1727. JET_TABLEID tableid, const char _far *szExpr, JET_GRBIT grbit,
  1728. signed long _far *pcrow);
  1729. JET_ERR JET_API JetFastFindBegin(JET_SESID sesid, JET_DBID dbid,
  1730. JET_TABLEID tableid, const char _far *szExpr, JET_GRBIT grbit);
  1731. JET_ERR JET_API JetFastFindEnd(JET_SESID sesid, JET_TABLEID tableid);
  1732. JET_ERR JET_API JetGetBookmark(JET_SESID sesid, JET_TABLEID tableid,
  1733. void _far *pvBookmark, unsigned long cbMax,
  1734. unsigned long _far *pcbActual);
  1735. JET_ERR JET_API JetRefreshLink(JET_SESID sesid, JET_DBID dbid,
  1736. const char _far *szLinkName, const char _far *szConnect,
  1737. const char _far *szDatabase);
  1738. #ifdef _MSC_VER /* CONSIDER: CSL doesn't like this */
  1739. JET_ERR JET_API JetRepairDatabase(JET_SESID sesid, const char _far *lszDbFile,
  1740. JET_PFNSTATUS pfnstatus);
  1741. #endif /* _MSC_VER */
  1742. JET_ERR JET_API JetCompact(JET_SESID sesid, const char _far *szDatabaseSrc,
  1743. const char _far *szConnectSrc, const char _far *szDatabaseDest,
  1744. const char _far *szConnectDest, JET_PFNSTATUS pfnStatus,
  1745. JET_GRBIT grbit);
  1746. JET_ERR JET_API JetGotoBookmark(JET_SESID sesid, JET_TABLEID tableid,
  1747. void _far *pvBookmark, unsigned long cbBookmark);
  1748. JET_ERR JET_API JetComputeStats(JET_SESID sesid, JET_TABLEID tableid);
  1749. JET_ERR JET_API JetCreateRelationship(JET_SESID sesid,JET_DBID dbidIn,
  1750. const char _far *szRelationshipName, const char _far *szObjectName,
  1751. const char _far *szColumns, const char _far *szReferencedObject,
  1752. const char _far *szReferncedColumns, char _far *szLongName,
  1753. unsigned long cbMax, unsigned long _far *pcbActual, JET_GRBIT grbit);
  1754. JET_ERR JET_API JetDeleteRelationship(JET_SESID sesid, JET_DBID dbidIn,
  1755. const char _far *szName);
  1756. JET_ERR JET_API JetGetRelationshipInfo(JET_SESID sesid, JET_DBID dbid,
  1757. const char _far *szTableName, const char _far *szRelationship,
  1758. void _far *pvResult, unsigned long cbResult);
  1759. /*****************************************************************************
  1760. SEC API
  1761. *****************************************************************************/
  1762. JET_ERR JET_API JetGetSidFromName(JET_SESID sesid, const char _far *szName,
  1763. void _far *pvSid, unsigned long cbMax, unsigned long _far *pcbActual,
  1764. long _far *pfGroup);
  1765. JET_ERR JET_API JetGetNameFromSid(JET_SESID sesid,
  1766. const void _far *pvSid, unsigned long cbSid,
  1767. char _far *szName, unsigned long cchName, long _far *pfGroup);
  1768. JET_ERR JET_API JetCreateUser(JET_SESID sesid, const char _far *szUser,
  1769. const char _far *szPassword, const char _far *szPin);
  1770. JET_ERR JET_API JetChangeUserPassword(JET_SESID sesid,
  1771. const char _far *szUser, const char _far *szOldPassword,
  1772. const char _far *szNewPassword);
  1773. JET_ERR JET_API JetDeleteUser(JET_SESID sesid, const char _far *szUser);
  1774. JET_ERR JET_API JetCreateGroup(JET_SESID sesid, const char _far *szGroup,
  1775. const char _far *szPin);
  1776. JET_ERR JET_API JetAddMember(JET_SESID sesid,
  1777. const char _far *szGroup, const char _far *szUser);
  1778. JET_ERR JET_API JetRemoveMember(JET_SESID sesid,
  1779. const char _far *szGroup, const char _far *szUser);
  1780. JET_ERR JET_API JetDeleteGroup(JET_SESID sesid, const char _far *szGroup);
  1781. JET_ERR JET_API JetSetAccess(JET_SESID sesid, JET_DBID dbid,
  1782. const char _far *szContainerName, const char _far *szObjectName,
  1783. const char _far *szName, JET_ACM acm, JET_GRBIT grbit);
  1784. JET_ERR JET_API JetGetAccess(JET_SESID sesid, JET_DBID dbid,
  1785. const char _far *szContainerName, const char _far *szObjectName,
  1786. const char _far *szName, long fIndividual,
  1787. JET_ACM _far *pacm, JET_GRBIT _far *pgrbit);
  1788. JET_ERR JET_API JetValidateAccess(JET_SESID sesid, JET_DBID dbid,
  1789. const char _far *szContainerName, const char _far *szObjectName,
  1790. JET_ACM acmRequired);
  1791. JET_ERR JET_API JetSetOwner(JET_SESID sesid, JET_DBID dbid,
  1792. const char _far *szContainerName, const char _far *szObjectName,
  1793. const char _far *szName);
  1794. JET_ERR JET_API JetGetOwner(JET_SESID sesid, JET_DBID dbid,
  1795. const char _far *szContainerName, const char _far *szObjectName,
  1796. char _far *szName, unsigned long cchMax);
  1797. /*****************************************************************************
  1798. Property Management API
  1799. *****************************************************************************/
  1800. JET_ERR JET_API JetSetProperty(JET_SESID sesid, JET_DBID dbid,
  1801. const char _far *szContainerName, const char _far *szObjectName,
  1802. const char _far *szSubObjectName, const char _far *szPropertyName,
  1803. void _far *pvData, unsigned long cbData, JET_COLTYP coltyp,
  1804. JET_GRBIT grbit);
  1805. JET_ERR JET_API JetRetrieveProperty(JET_SESID sesid, JET_DBID dbid,
  1806. const char _far *szContainerName, const char _far *szObjectName,
  1807. const char _far *szSubObjectName, const char _far *szPropertyName,
  1808. void _far *pvData, unsigned long cbData, unsigned long _far *pcbActual,
  1809. JET_COLTYP _far *pcoltyp, JET_GRBIT grbit, unsigned long InfoLevel);
  1810. JET_ERR JET_API JetSetTableProperty(JET_SESID sesid, JET_TABLEID tableid,
  1811. const char _far *szSubObjectName, const char _far *szPropertyName,
  1812. void _far *pvData, unsigned long cbData, JET_COLTYP coltyp,
  1813. JET_GRBIT grbit);
  1814. JET_ERR JET_API JetRetrieveTableProperty(JET_SESID sesid, JET_TABLEID tableid,
  1815. const char _far *szSubObjectName, const char _far *szPropertyName,
  1816. void _far *pvData, unsigned long cbData, unsigned long _far *pcbActual,
  1817. JET_COLTYP _far *pcoltyp, JET_GRBIT grbit, unsigned long InfoLevel);
  1818. /*****************************************************************************
  1819. LINK API
  1820. *****************************************************************************/
  1821. JET_ERR JET_API JetCreateLink(JET_SESID sesid, JET_DBID dbid,
  1822. const char _far *szLink, JET_DBID dbidFrom, const char _far *szFrom,
  1823. JET_GRBIT grbit);
  1824. JET_ERR JET_API JetExecuteSql(JET_SESID sesid, JET_DBID dbid,
  1825. const char _far *szSql);
  1826. /***************************************************************************
  1827. Query API
  1828. *****************************************************************************/
  1829. JET_ERR JET_API JetOpenVtQbe(JET_SESID sesid, const char _far *szExpn,
  1830. long _far *plCols, JET_TABLEID _far *ptableid, JET_GRBIT grbit);
  1831. JET_ERR JET_API JetCreateQuery(JET_SESID sesid, JET_DBID dbid,
  1832. const char _far *szQuery, JET_TABLEID _far *ptableid);
  1833. JET_ERR JET_API JetOpenQueryDef(JET_SESID sesid, JET_DBID dbid,
  1834. const char _far *szQuery, JET_TABLEID _far *ptableid);
  1835. /* CONSIDER: Is rgchSql a zero-terminated string? Maybe it should be for
  1836. * consistency.
  1837. */
  1838. JET_ERR JET_API JetSetQoSql(JET_SESID sesid, JET_TABLEID tableid,
  1839. char _far *rgchSql, unsigned long cchSql, const char _far *szConnect,
  1840. JET_GRBIT grbit);
  1841. JET_ERR JET_API JetRetrieveQoSql(JET_SESID sesid, JET_TABLEID tableid,
  1842. char _far *rgchSql, unsigned long cchMax,
  1843. unsigned long _far *pcchActual, void _far *pvConnect,
  1844. unsigned long cbConnectMax, unsigned long _far *pcbConnectActual,
  1845. JET_GRBIT _far *pgrbit);
  1846. JET_ERR JET_API JetCopyQuery(JET_SESID sesid, JET_TABLEID tableidSrc,
  1847. JET_DBID dbidDest, const char _far *szQueryDest,
  1848. JET_TABLEID _far *ptableidDest);
  1849. JET_ERR JET_API JetOpenSVT(JET_SESID sesid, JET_DBID dbid,
  1850. const char _far *szQuery, const void _far *pvParameters,
  1851. unsigned long cbParameters, unsigned long crowSample, JET_GRBIT grbit,
  1852. void _far *pmgblist, unsigned long cbMax, unsigned long _far *pcbActual);
  1853. JET_ERR JET_API JetGetQueryParameterInfo(JET_SESID sesid, JET_DBID dbid,
  1854. const char _far *szQuery, void _far *pvResult, unsigned long cbMax,
  1855. unsigned long _far *pcbActual);
  1856. JET_ERR JET_API JetRestartQuery(JET_SESID sesid, JET_TABLEID tableid,
  1857. const void _far *pvParameters, unsigned long cbParameters);
  1858. JET_ERR JET_API JetSetFatCursor(JET_SESID sesid, JET_TABLEID tableid,
  1859. void _far *pvBookmark, unsigned long cbBookmark, unsigned long crowSize);
  1860. JET_ERR JET_API JetFillFatCursor(JET_SESID sesid, JET_TABLEID tableid,
  1861. void _far *pvBookmark, unsigned long cbBookmark, unsigned long crow,
  1862. unsigned long _far *pcrow, JET_GRBIT grbit);
  1863. JET_ERR JET_API JetExecuteTempQuery(JET_SESID sesid, JET_DBID dbid,
  1864. JET_TABLEID tableid, const void _far *pvParameters,
  1865. unsigned long cbParameters, JET_GRBIT grbit, JET_TABLEID _far *ptableid);
  1866. JET_ERR JET_API JetExecuteTempSVT(JET_SESID sesid, JET_DBID dbid,
  1867. JET_TABLEID tableid, const void _far *pvParameters,
  1868. unsigned long cbParameters, unsigned long crowSample, JET_GRBIT grbit,
  1869. void _far *pmgblist, unsigned long cbMax, unsigned long _far *pcbActual);
  1870. JET_ERR JET_API JetGetTempQueryColumnInfo(JET_SESID sesid, JET_DBID dbid,
  1871. JET_TABLEID tableid, const char _far *szColumnName,
  1872. void _far *pvResult, unsigned long cbMax, unsigned long InfoLevel);
  1873. JET_ERR JET_API JetGetTempQueryParameterInfo(JET_SESID sesid, JET_DBID dbid,
  1874. JET_TABLEID tableid, void _far *pvResult, unsigned long cbMax,
  1875. unsigned long _far *pcbActual);
  1876. JET_ERR JET_API JetValidateData(JET_SESID sesid, JET_TABLEID tableidBase,
  1877. JET_TABLEID _far *ptableid );
  1878. /***************************************************************************
  1879. API for Installable ISAMs
  1880. ****************************************************************************/
  1881. typedef ULONG_PTR JET_VSESID; /* Received from dispatcher */
  1882. struct tagVDBFNDEF;
  1883. typedef ULONG_PTR JET_VDBID; /* Received from dispatcher */
  1884. JET_ERR JET_API JetAllocateDbid(JET_SESID sesid, JET_DBID _far *pdbid, JET_VDBID vdbid, const struct tagVDBFNDEF _far *pvdbfndef, JET_VSESID vsesid);
  1885. JET_ERR JET_API JetUpdateDbid(JET_SESID sesid, JET_DBID dbid, JET_VDBID vdbid, const struct tagVDBFNDEF _far *pvdbfndef);
  1886. JET_ERR JET_API JetReleaseDbid(JET_SESID sesid, JET_DBID dbid);
  1887. struct tagVTFNDEF;
  1888. typedef ULONG_PTR JET_VTID; /* Received from dispatcher */
  1889. JET_ERR JET_API JetAllocateTableid(JET_SESID sesid, JET_TABLEID _far *ptableid, JET_VTID vtid, const struct tagVTFNDEF _far *pvtfndef, JET_VSESID vsesid);
  1890. JET_ERR JET_API JetUpdateTableid(JET_SESID sesid, JET_TABLEID tableid, JET_VTID vtid, const struct tagVTFNDEF _far *pvtfndef);
  1891. JET_ERR JET_API JetReleaseTableid(JET_SESID sesid, JET_TABLEID tableid);
  1892. JET_ERR JET_API JetOpenTempTable(JET_SESID sesid,
  1893. const JET_COLUMNDEF _far *prgcolumndef, unsigned long ccolumn,
  1894. JET_GRBIT grbit, JET_TABLEID _far *ptableid,
  1895. JET_COLUMNID _far *prgcolumnid);
  1896. /***************************************************************************
  1897. MISC JET API
  1898. ****************************************************************************/
  1899. JET_ERR JET_API JetStringCompare(char _far *pb1, unsigned long cb1,
  1900. char _far *pb2, unsigned long cb2, unsigned long sort,
  1901. long _far *plResult);
  1902. /***************************************************************************
  1903. ADDITIONAL JET BLUE API
  1904. ****************************************************************************/
  1905. JET_ERR JET_API JetBackup( const char _far *szBackupPath, JET_GRBIT grbit );
  1906. JET_ERR JET_API JetRestore(const char _far *sz, int crstmap, JET_RSTMAP *rgrstmap, JET_PFNSTATUS pfn );
  1907. JET_ERR JET_API JetSetIndexRange(JET_SESID sesid,
  1908. JET_TABLEID tableidSrc, JET_GRBIT grbit);
  1909. JET_ERR JET_API JetIndexRecordCount(JET_SESID sesid,
  1910. JET_TABLEID tableid, unsigned long _far *pcrec, unsigned long crecMax );
  1911. JET_ERR JET_API JetRetrieveKey(JET_SESID sesid,
  1912. JET_TABLEID tableid, void _far *pvData, unsigned long cbMax,
  1913. unsigned long _far *pcbActual, JET_GRBIT grbit );
  1914. #ifdef JETSER
  1915. JET_ERR JET_API JetGetChecksum( JET_SESID sesid,
  1916. JET_TABLEID tableid, unsigned long _far *pulChecksum );
  1917. JET_ERR JET_API JetGetObjidFromName(JET_SESID sesid,
  1918. JET_DBID dbid, const char _far *szContainerName,
  1919. const char _far *szObjectName,
  1920. unsigned long _far *pulObjectId );
  1921. #endif
  1922. #endif /* _JET_NOPROTOTYPES */
  1923. #undef _far
  1924. #pragma pack()
  1925. #ifdef __cplusplus
  1926. }
  1927. #endif
  1928. #endif /* _JET_INCLUDED */
  1929. #endif __JET500