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.

1203 lines
48 KiB

  1. /************************************************************************
  2. ** D B D A O . H *
  3. ** *
  4. *************************************************************************
  5. ** Copyright (C) 1996 by Microsoft Corporation *
  6. ** All Rights Reserved *
  7. ************************************************************************/
  8. /*
  9. DBDAO.H
  10. Class definitions for ddao SDK.
  11. This is a part of the Microsoft Data Access Objects SDK library.
  12. See the DAO SDK help information for detailed information regarding the
  13. Microsoft Data Access Objects SDK product.
  14. */
  15. #ifndef _DBDAO_H_
  16. #define _DBDAO_H_
  17. // Ignore warning "non dll-interface class 'X' used as base for dll-interface class 'Y'
  18. #pragma warning( disable : 4275 )
  19. //DAO must be built with an MFC version >= 4.2 (or you'll get memory problems with CStrings)
  20. #if _MFC_VER < 0x0420
  21. #error The DAOSDK 3.5 libraries will not operate correctly if built with MFC older than 4.2
  22. #endif
  23. #ifndef DAO35
  24. #define DAO35
  25. #endif
  26. #include <dbdaoint.h>
  27. #include <daogetrw.h>
  28. #include <dbdaoid.h>
  29. // Decorations
  30. #define CONSTRUCTOR
  31. #define DESTRUCTOR
  32. //Disable export
  33. #ifndef DLLEXPORT
  34. #define DLLEXPORT __declspec( dllexport )
  35. #endif
  36. //Macro to convert HRESULT to IDA
  37. #define DBERR(x) SCODE_CODE(GetScode(x))
  38. // Include internal DAO definitions
  39. #include <_dbdao.h>
  40. // DAO Recordset::GetRowsEx() binding definitions
  41. #define dbBindIndexINT 1
  42. #define dbBindIndexSTR 2
  43. #define dbBindI2 DAO_I2 // long
  44. #define dbBindI4 DAO_I4 // short
  45. #define dbBindR4 DAO_R4 // float
  46. #define dbBindR8 DAO_R8 // double
  47. #define dbBindCY DAO_CURRENCY // Currency
  48. #define dbBindDATE DAO_DATE // DATE
  49. #define dbBindBOOL DAO_BOOL // VARIANT_BOOL
  50. #define dbBindUI1 DAO_CHAR // unsigned char
  51. #define dbBindVARIANT DAO_ANYVARIANT // VARIANT
  52. #define dbBindWCHAR DAO_WCHAR // wchar_t[] (inline)
  53. #define dbBindBookmark DAO_BOOKMARK // bookmark psuedo field
  54. #define dbBindLPSTR DAO_LPSTR // \0 string in pvVarBuffer
  55. #define dbBindLPWSTR DAO_LPWSTR // wide string in pvVarBuffer
  56. #define dbBindBlob DAO_BLOB //
  57. #ifdef _UNICODE
  58. #define dbBindSTRING dbBindWCHAR
  59. #define dbBindLPSTRING dbBindLPWSTR
  60. #else
  61. #define dbBindSTRING dbBindUI1
  62. #define dbBindLPSTRING dbBindLPSTR
  63. #endif
  64. // Binding structure (Used with GetRowsEX)
  65. typedef struct
  66. {
  67. DWORD dwBindIndexType;
  68. union
  69. {
  70. LONG i;
  71. LPCTSTR pstr;
  72. };
  73. DWORD dwType;
  74. DWORD dwOffset;
  75. DWORD cb;
  76. } DAORSETBINDING, *LPDAORSETBINDING;
  77. /*****************************************************************************
  78. * Forwards
  79. */
  80. class COleVariant;
  81. class CdbBookmark;
  82. class CdbException;
  83. class CdbOleObject;
  84. class CdbObject;
  85. class CdbError;
  86. class CdbProperty;
  87. class CdbDBEngine;
  88. class CdbWorkspace;
  89. class CdbDatabase;
  90. class CdbConnection;
  91. class CdbRecordset;
  92. class CdbGetRowsEx;
  93. class CdbQueryDef;
  94. class CdbTableDef;
  95. class CdbField;
  96. class CdbRelation;
  97. class CdbIndex;
  98. class CdbUser;
  99. class CdbGroup;
  100. class CdbDocument;
  101. class CdbContainer;
  102. class CdbParameter;
  103. class CdbCollection;
  104. class CdbErrors;
  105. class CdbProperties;
  106. class CdbWorkspaces;
  107. class CdbDatabases;
  108. class CdbConnections;
  109. class CdbRecordsets;
  110. class CdbQueryDefs;
  111. class CdbTableDefs;
  112. class CdbFields;
  113. class CdbRelations;
  114. class CdbIndexes;
  115. class CdbUsers;
  116. class CdbGroups;
  117. class CdbDocuments;
  118. class CdbContainers;
  119. class CdbParameters;
  120. /*****************************************************************************
  121. * CdbException
  122. */
  123. class DLLEXPORT CdbException
  124. {
  125. public:
  126. CONSTRUCTOR CdbException (HRESULT hr);
  127. HRESULT m_hr;
  128. };
  129. /*****************************************************************************
  130. * CdbBookmark
  131. */
  132. class DLLEXPORT CdbBookmark : public COleVariant
  133. {
  134. public:
  135. CONSTRUCTOR CdbBookmark (LPSAFEARRAY psa);
  136. CONSTRUCTOR CdbBookmark ();
  137. CONSTRUCTOR CdbBookmark (const CdbBookmark &);
  138. CdbBookmark & operator = (const CdbBookmark &);
  139. operator LPSAFEARRAY (VOID);
  140. };
  141. /*****************************************************************************
  142. * CdbIndexFields (special case for index fields)
  143. */
  144. class DLLEXPORT CdbIndexFields : public CdbFields
  145. {
  146. public:
  147. CdbField Item (LPCTSTR pstr);
  148. CdbField Item (LONG i);
  149. CdbObject ObItem (LPCTSTR pstr);
  150. CdbObject ObItem (LONG i);
  151. };
  152. /*****************************************************************************
  153. * CdbLastOLEError
  154. */
  155. class DLLEXPORT CdbLastOLEError : public CdbOleObject
  156. {
  157. public:
  158. CONSTRUCTOR CdbLastOLEError (VOID);
  159. CString GetSource (VOID);
  160. CString GetDescription (VOID);
  161. CString GetHelpFile (VOID);
  162. DWORD GetHelpContext (VOID);
  163. };
  164. /*****************************************************************************
  165. * CdbDBEngine
  166. */
  167. class DLLEXPORT CdbDBEngine : public CdbObject
  168. {
  169. public:
  170. // Administration
  171. CONSTRUCTOR CdbDBEngine (DAODBEngine *peng, BOOL bAddRef=FALSE);
  172. CONSTRUCTOR CdbDBEngine (BOOL bPrivate=FALSE, BOOL bStart=TRUE, LPCTSTR pstrIniPath=NULL, LPCTSTR pstrDefUser=NULL, LPCTSTR pstrDefPW=NULL, LONG lType=dbUseJet);
  173. CONSTRUCTOR CdbDBEngine (const CdbDBEngine &);
  174. CdbDBEngine & operator = (const CdbDBEngine &);
  175. inline CdbWorkspace operator [] (LONG lIndex);
  176. inline CdbWorkspace operator [] (LPCTSTR pstrIndex);
  177. VOID OnInterfaceChange (VOID);
  178. // Properties
  179. VOID SetDefaultPassword (LPCTSTR pstr);
  180. VOID SetDefaultUser (LPCTSTR pstr);
  181. VOID SetIniPath (LPCTSTR pstr);
  182. CString GetIniPath (VOID);
  183. VOID SetDefaultType (LONG l);
  184. LONG GetDefaultType (VOID);
  185. VOID SetLoginTimeout (SHORT s);
  186. SHORT GetLoginTimeout (VOID);
  187. CString GetVersion (VOID);
  188. CString GetSystemDB (VOID);
  189. VOID SetSystemDB (LPCTSTR pstr);
  190. // Methods
  191. CdbWorkspace CreateWorkspace (LPCTSTR pstrName, LPCTSTR pstrUser, LPCTSTR pstrPassword, LONG lType=-1);
  192. CdbDatabase OpenDatabase (LPCTSTR pstrName, BOOL bExclusive, BOOL bReadOnly=FALSE, LPCTSTR pstrConnect=NULL);
  193. CdbDatabase OpenDatabase (LPCTSTR pstrName, LONG lOption=0L, BOOL bReadOnly=FALSE, LPCTSTR pstrConnect=NULL);
  194. CdbConnection OpenConnection (LPCTSTR pstrName, LONG lOption=-1L, BOOL bReadOnly=FALSE, LPCTSTR pstrConnect=NULL);
  195. VOID CompactDatabase (LPCTSTR pstrOldDatabase, LPCTSTR pstrNewDatabase, LPCTSTR pstrDstConnect = NULL, LONG lOptions=-1, LPCTSTR pstrSrcConnect = NULL);
  196. VOID RepairDatabase (LPCTSTR pstrDatabase);
  197. VOID RegisterDatabase (LPCTSTR pstrDatabase, LPCTSTR pstrDriver, BOOL bSilent, LPCTSTR pstrAttributes);
  198. VOID Idle (LONG lOptions=-1);
  199. VOID Start (VOID);
  200. VOID SetOption (long lOption, LPVARIANT pvValue);
  201. // Collections
  202. CdbWorkspaces Workspaces;
  203. CdbErrors Errors;
  204. private:
  205. BOOL m_bStarted;
  206. };
  207. /*****************************************************************************
  208. * CdbWorkspace
  209. */
  210. class DLLEXPORT CdbWorkspace : public CdbObject
  211. {
  212. public:
  213. // Administration
  214. CONSTRUCTOR CdbWorkspace (VOID);
  215. CONSTRUCTOR CdbWorkspace (DAOWorkspace *pwrk, BOOL bAddRef=FALSE);
  216. CONSTRUCTOR CdbWorkspace (const CdbWorkspace &);
  217. CdbWorkspace & operator = (const CdbWorkspace &);
  218. inline CdbDatabase operator [] (LONG lIndex);
  219. inline CdbDatabase operator [] (LPCTSTR pstrIndex);
  220. VOID OnInterfaceChange (VOID);
  221. // Properties
  222. CString GetName (VOID);
  223. VOID SetName (LPCTSTR pstr);
  224. CString GetUserName (VOID);
  225. BOOL GetIsolateODBCTrans (VOID);
  226. VOID SetIsolateODBCTrans (BOOL b);
  227. LONG GetType (VOID);
  228. LONG GetDefaultCursorDriver (VOID);
  229. VOID SetDefaultCursorDriver (LONG l);
  230. LONG GetLoginTimeout (VOID);
  231. VOID SetLoginTimeout (LONG l);
  232. // Methods
  233. VOID BeginTrans (VOID);
  234. VOID CommitTrans (LONG lOptions=-1);
  235. VOID Close (VOID);
  236. VOID Rollback (VOID);
  237. CdbDatabase OpenDatabase (LPCTSTR pstrName, BOOL bExclusive, BOOL bReadOnly=FALSE, LPCTSTR pstrConnect=NULL);
  238. CdbDatabase OpenDatabase (LPCTSTR pstrName, LONG lOption=0L, BOOL bReadOnly=FALSE, LPCTSTR pstrConnect=NULL);
  239. CdbConnection OpenConnection (LPCTSTR pstrName, LONG lOption=-1L, BOOL bReadOnly=FALSE, LPCTSTR pstrConnect=NULL);
  240. CdbDatabase CreateDatabase (LPCTSTR pstrName, LPCTSTR pstrConnect, LONG lOption=-1);
  241. CdbUser CreateUser (LPCTSTR pstrName=NULL, LPCTSTR pstrPID=NULL, LPCTSTR pstrPassword=NULL);
  242. CdbGroup CreateGroup (LPCTSTR pstrName=NULL, LPCTSTR pstrPID=NULL);
  243. // Collections
  244. CdbDatabases Databases;
  245. CdbConnections Connections;
  246. CdbUsers Users;
  247. CdbGroups Groups;
  248. };
  249. /*****************************************************************************
  250. * CdbDatabase
  251. */
  252. class DLLEXPORT CdbDatabase : public CdbObject
  253. {
  254. public:
  255. // Administration
  256. CONSTRUCTOR CdbDatabase (VOID);
  257. CONSTRUCTOR CdbDatabase (DAODatabase *pdb, BOOL bAddRef=FALSE);
  258. CONSTRUCTOR CdbDatabase (const CdbDatabase &);
  259. CdbDatabase & operator = (const CdbDatabase &);
  260. inline CdbTableDef operator [] (LONG lIndex);
  261. inline CdbTableDef operator [] (LPCTSTR pstrIndex);
  262. VOID OnInterfaceChange (VOID);
  263. // Properties
  264. LONG GetCollatingOrder (VOID);
  265. CString GetConnect (VOID);
  266. VOID SetConnect (LPCTSTR pstrConnect);
  267. CString GetName (VOID);
  268. SHORT GetQueryTimeout (VOID);
  269. VOID SetQueryTimeout (SHORT s);
  270. BOOL GetTransactions (VOID);
  271. BOOL GetUpdatable (VOID);
  272. CString GetVersion (VOID);
  273. LONG GetRecordsAffected (VOID);
  274. CdbConnection GetConnection (VOID);
  275. //Replication properties
  276. CString GetReplicaID (VOID);
  277. CString GetDesignMasterID (VOID);
  278. VOID SetDesignMasterID (LPCTSTR pstrMasterID);
  279. // Methods
  280. VOID Close (VOID);
  281. VOID Execute (LPCTSTR pstrQuery, LONG lOption=-1);
  282. CdbRecordset OpenRecordset (LPCTSTR pstrName, LONG lType=-1, LONG lOptions=-1, LONG lLockEdit=-1);
  283. CdbProperty CreateProperty (LPCTSTR pstrName=NULL, LONG lType=-1, LPVARIANT pvValue=NULL, BOOL bDDL=FALSE);
  284. CdbRelation CreateRelation (LPCTSTR pstrName=NULL, LPCTSTR pstrTable=NULL, LPCTSTR pstrForiegn=NULL, LONG lAttributes=-1);
  285. CdbTableDef CreateTableDef (LPCTSTR pstrName=NULL, LONG lAttributes=-1, LPCTSTR pstrSource=NULL, LPCTSTR pstrConnect=NULL);
  286. CdbQueryDef CreateQueryDef (LPCTSTR pstrName=NULL, LPCTSTR pstrSQL=NULL);
  287. VOID NewPassword (LPCTSTR pstrOld, LPCTSTR pstrNew);
  288. //Replication methods
  289. VOID Synchronize (LPCTSTR pstrReplica, LONG lType=-1);
  290. VOID MakeReplica (LPCTSTR pstrPath, LPCTSTR pstrDescription, LONG lOptions=-1);
  291. VOID PopulatePartial (LPCTSTR pstrDbPathName);
  292. // Collections
  293. CdbTableDefs TableDefs;
  294. CdbQueryDefs QueryDefs;
  295. CdbRelations Relations;
  296. CdbContainers Containers;
  297. CdbRecordsets Recordsets;
  298. };
  299. /*****************************************************************************
  300. * CdbConnection
  301. */
  302. class DLLEXPORT CdbConnection : public CdbObject
  303. {
  304. public:
  305. // Administration
  306. CONSTRUCTOR CdbConnection (VOID);
  307. CONSTRUCTOR CdbConnection (DAOConnection *pconn, BOOL bAddRef=FALSE);
  308. CONSTRUCTOR CdbConnection (const CdbConnection &);
  309. CdbConnection & operator = (const CdbConnection &);
  310. inline CdbQueryDef operator [] (LONG lIndex);
  311. inline CdbQueryDef operator [] (LPCTSTR pstrIndex);
  312. VOID OnInterfaceChange (VOID);
  313. // Properties
  314. CString GetConnect (VOID);
  315. CString GetName (VOID);
  316. CdbDatabase GetDatabase (VOID);
  317. SHORT GetQueryTimeout (VOID);
  318. VOID SetQueryTimeout (SHORT s);
  319. LONG GetRecordsAffected (VOID);
  320. BOOL GetStillExecuting (VOID);
  321. BOOL GetTransactions (VOID);
  322. BOOL GetUpdatable (VOID);
  323. // Methods
  324. VOID Cancel (VOID);
  325. VOID Close (VOID);
  326. CdbQueryDef CreateQueryDef (LPCTSTR pstrName=NULL, LPCTSTR pstrSQL=NULL);
  327. VOID Execute (LPCTSTR pstrQuery, LONG lOption=-1);
  328. CdbRecordset OpenRecordset (LPCTSTR pstrName, LONG lType=-1, LONG lOptions=-1, LONG lLockEdit=-1);
  329. // Collections
  330. CdbQueryDefs QueryDefs;
  331. CdbRecordsets Recordsets;
  332. };
  333. /*****************************************************************************
  334. * CdbRecordset
  335. */
  336. class DLLEXPORT CdbRecordset : public CdbObject
  337. {
  338. public:
  339. // Administration
  340. CONSTRUCTOR CdbRecordset (VOID);
  341. CONSTRUCTOR CdbRecordset (DAORecordset *prs, BOOL bAddRef=FALSE);
  342. CONSTRUCTOR CdbRecordset (const CdbRecordset &);
  343. CdbRecordset & operator = (const CdbRecordset &);
  344. inline CdbField operator [] (LONG lIndex);
  345. inline CdbField operator [] (LPCTSTR pstrIndex);
  346. VOID OnInterfaceChange (VOID);
  347. VOID SetGetRowsExInt (VOID);
  348. // Properties
  349. BOOL GetBOF (VOID);
  350. CdbBookmark GetBookmark (VOID);
  351. VOID SetBookmark (class CdbBookmark);
  352. BOOL GetBookmarkable (VOID);
  353. COleDateTime GetDateCreated (VOID);
  354. COleDateTime GetLastUpdated (VOID);
  355. BOOL GetEOF (VOID);
  356. CString GetFilter (VOID);
  357. VOID SetFilter (LPCTSTR pstr);
  358. CString GetIndex (VOID);
  359. VOID SetIndex (LPCTSTR pstr);
  360. CdbBookmark GetLastModified (VOID);
  361. BOOL GetLockEdits (VOID);
  362. VOID SetLockEdits (BOOL b);
  363. CString GetName (VOID);
  364. BOOL GetNoMatch (VOID);
  365. CString GetSort (VOID);
  366. VOID SetSort (LPCTSTR pstr);
  367. BOOL GetTransactions (VOID);
  368. SHORT GetType (VOID);
  369. LONG GetRecordCount (VOID);
  370. BOOL GetUpdatable (VOID);
  371. BOOL GetRestartable (VOID);
  372. CString GetValidationText (VOID);
  373. CString GetValidationRule (VOID);
  374. CdbBookmark GetCacheStart (VOID);
  375. VOID SetCacheStart (CdbBookmark &pbm);
  376. LONG GetCacheSize (VOID);
  377. VOID SetCacheSize (LONG l);
  378. FLOAT GetPercentPosition (VOID);
  379. VOID SetPercentPosition (FLOAT f);
  380. LONG GetAbsolutePosition (VOID);
  381. VOID SetAbsolutePosition (LONG l);
  382. SHORT GetEditMode (VOID);
  383. LONG GetUpdateOptions (VOID);
  384. VOID SetUpdateOptions (LONG l);
  385. SHORT GetRecordStatus (VOID);
  386. BOOL GetStillExecuting (VOID);
  387. LONG GetBatchSize (VOID);
  388. VOID SetBatchSize (LONG l);
  389. LONG GetBatchCollisionCount (VOID);
  390. COleVariant GetBatchCollisions (VOID);
  391. CdbConnection GetConnection (VOID);
  392. // Methods
  393. VOID CancelUpdate (short sType = dbUpdateRegular);
  394. VOID AddNew (VOID);
  395. VOID Close (VOID);
  396. CdbRecordset OpenRecordset (LONG lType=-1, LONG lOption=-1);
  397. VOID Delete (VOID);
  398. VOID Edit (VOID);
  399. VOID FindFirst (LPCTSTR pstrCriteria);
  400. VOID FindLast (LPCTSTR pstrCriteria);
  401. VOID FindNext (LPCTSTR pstrCriteria);
  402. VOID FindPrevious (LPCTSTR pstrCriteria);
  403. VOID MoveFirst (VOID);
  404. VOID MoveLast (LONG lOptions=-1);
  405. VOID MoveNext (VOID);
  406. VOID MovePrevious (VOID);
  407. VOID Seek (LPCTSTR pstrComparison, LONG lNumFields, COleVariant cKey, ...);
  408. VOID Update (short sType = dbUpdateRegular, VARIANT_BOOL bForce = FALSE);
  409. CdbRecordset Clone (VOID);
  410. VOID Requery (CdbQueryDef *pq = NULL);
  411. VOID Move (LONG lRows, CdbBookmark *bm=NULL);
  412. VOID FillCache (LONG lRows=-1, CdbBookmark *pbm=NULL);
  413. CdbQueryDef CopyQueryDef (VOID);
  414. COleVariant GetRows (LONG lRows=-1);
  415. LONG GetRowsEx (LPVOID pvBuffer, LONG cbRow, LPDAORSETBINDING prb, LONG cBinding, LPVOID pvVarBuffer = NULL, LONG cbVarBuffer = 0, LONG lRows = -1);
  416. VOID Cancel (VOID);
  417. BOOL NextRecordset (VOID);
  418. inline VOID GetFieldV (COleVariant &vIndex, COleVariant &vValue);
  419. inline VOID SetFieldV (COleVariant &vIndex, LPVARIANT pv);
  420. COleVariant GetField (LPCTSTR pstrIndex);
  421. COleVariant GetField (LONG lIndex);
  422. COleVariant GetField (COleVariant &vIndex);
  423. COleVariant GetField (CString &str){return GetField((LPCTSTR)str);}
  424. VOID SetField (LPCTSTR pstrIndex, LPVARIANT pv);
  425. VOID SetField (LONG lIndex, LPVARIANT pv);
  426. VOID SetField (COleVariant &vIndex, LPVARIANT pv);
  427. VOID SetField (CString &str, LPVARIANT pv){SetField((LPCTSTR)str, pv);}
  428. // Collections
  429. CdbFields Fields;
  430. protected:
  431. // GetRowsEx interface
  432. CdbGetRowsEx m_GetRowsInt;
  433. };
  434. /*****************************************************************************
  435. * CdbField
  436. */
  437. class DLLEXPORT CdbField : public CdbObject
  438. {
  439. public:
  440. // Administration
  441. CONSTRUCTOR CdbField (VOID);
  442. CONSTRUCTOR CdbField (DAOField *pfld, BOOL bAddRef=FALSE);
  443. CONSTRUCTOR CdbField (const CdbField &);
  444. CdbField & operator = (const CdbField &);
  445. VOID OnInterfaceChange (VOID);
  446. // Properties
  447. LONG GetCollatingOrder (VOID);
  448. SHORT GetType (VOID);
  449. VOID SetType (SHORT s);
  450. CString GetName (VOID);
  451. VOID SetName (LPCTSTR pstr);
  452. LONG GetSize (VOID);
  453. VOID SetSize (LONG l);
  454. CString GetSourceField (VOID);
  455. CString GetSourceTable (VOID);
  456. COleVariant GetValue (VOID);
  457. VOID SetValue (LPVARIANT pv);
  458. LONG GetAttributes (VOID);
  459. VOID SetAttributes (LONG l);
  460. SHORT GetOrdinalPosition (VOID);
  461. VOID SetOrdinalPosition (SHORT s);
  462. CString GetValidationText (VOID);
  463. VOID SetValidationText (LPCTSTR pstr);
  464. BOOL GetValidateOnSet (VOID);
  465. VOID SetValidateOnSet (BOOL b);
  466. CString GetValidationRule (VOID);
  467. VOID SetValidationRule (LPCTSTR pstr);
  468. CString GetDefaultValue (VOID);
  469. VOID SetDefaultValue (LPCTSTR pstr);
  470. VOID SetDefaultValue (LPVARIANT pv);
  471. BOOL GetRequired (VOID);
  472. VOID SetRequired (BOOL b);
  473. BOOL GetAllowZeroLength (VOID);
  474. VOID SetAllowZeroLength (BOOL b);
  475. BOOL GetDataUpdatable (VOID);
  476. CString GetForeignName (VOID);
  477. VOID SetForeignName (LPCTSTR pstr);
  478. COleVariant GetOriginalValue (VOID);
  479. COleVariant GetVisibleValue (VOID);
  480. // Methods
  481. VOID AppendChunk (LPVARIANT pv);
  482. COleVariant GetChunk (LONG lOffset, LONG lBytes);
  483. LONG FieldSize (VOID);
  484. CdbProperty CreateProperty (LPCTSTR pstrName=NULL, LONG lType=-1, LPVARIANT pvValue=NULL, BOOL bDDL=FALSE);
  485. };
  486. /*****************************************************************************
  487. * CdbQueryDef
  488. */
  489. class DLLEXPORT CdbQueryDef : public CdbObject
  490. {
  491. public:
  492. // Administration
  493. CONSTRUCTOR CdbQueryDef (VOID);
  494. CONSTRUCTOR CdbQueryDef (DAOQueryDef *pqd, BOOL bAddRef=FALSE);
  495. CONSTRUCTOR CdbQueryDef (const CdbQueryDef &);
  496. CdbQueryDef & operator = (const CdbQueryDef &);
  497. inline CdbField operator [] (LONG lIndex);
  498. inline CdbField operator [] (LPCTSTR pstrIndex);
  499. VOID OnInterfaceChange (VOID);
  500. // Properties
  501. COleDateTime GetDateCreated (VOID);
  502. COleDateTime GetLastUpdated (VOID);
  503. CString GetName (VOID);
  504. VOID SetName (LPCTSTR pstr);
  505. SHORT GetODBCTimeout (VOID);
  506. VOID SetODBCTimeout (SHORT s);
  507. SHORT GetType (VOID);
  508. CString GetSQL (VOID);
  509. VOID SetSQL (LPCTSTR pstr);
  510. BOOL GetUpdatable (VOID);
  511. CString GetConnect (VOID);
  512. VOID SetConnect (LPCTSTR pstr);
  513. BOOL GetReturnsRecords (VOID);
  514. VOID SetReturnsRecords (BOOL b);
  515. LONG GetRecordsAffected (VOID);
  516. LONG GetMaxRecords (VOID);
  517. VOID SetMaxRecords (LONG l);
  518. BOOL GetStillExecuting (VOID);
  519. LONG GetCacheSize (VOID);
  520. VOID SetCacheSize (LONG l);
  521. COleVariant GetPrepare (VOID);
  522. VOID SetPrepare (LPVARIANT pv);
  523. // Methods
  524. CdbRecordset OpenRecordset (LONG lType=-1, LONG lOption=-1, LONG lLockEdit=-1);
  525. VOID Execute (LONG lOption=-1);
  526. CdbProperty CreateProperty (LPCTSTR pstrName=NULL, LONG lType=-1, LPVARIANT pvValue=NULL, BOOL bDDL=FALSE);
  527. VOID Close (VOID);
  528. VOID Cancel (VOID);
  529. // Collections
  530. CdbFields Fields;
  531. CdbParameters Parameters;
  532. };
  533. /*****************************************************************************
  534. * CdbTableDef
  535. */
  536. class DLLEXPORT CdbTableDef : public CdbObject
  537. {
  538. public:
  539. // Administration
  540. CONSTRUCTOR CdbTableDef (VOID);
  541. CONSTRUCTOR CdbTableDef (DAOTableDef *ptd, BOOL bAddRef=FALSE);
  542. CONSTRUCTOR CdbTableDef (const CdbTableDef &);
  543. CdbTableDef & operator = (const CdbTableDef &);
  544. inline CdbField operator [] (LONG lIndex);
  545. inline CdbField operator [] (LPCTSTR pstrIndex);
  546. VOID OnInterfaceChange (VOID);
  547. // Properties
  548. LONG GetAttributes (VOID);
  549. VOID SetAttributes (LONG l);
  550. CString GetConnect (VOID);
  551. VOID SetConnect (LPCTSTR pstr);
  552. COleDateTime GetDateCreated (VOID);
  553. COleDateTime GetLastUpdated (VOID);
  554. CString GetName (VOID);
  555. VOID SetName (LPCTSTR pstr);
  556. CString GetSourceTableName (VOID);
  557. VOID SetSourceTableName (LPCTSTR pstr);
  558. BOOL GetUpdatable (VOID);
  559. CString GetValidationText (VOID);
  560. VOID SetValidationText (LPCTSTR pstr);
  561. CString GetValidationRule (VOID);
  562. VOID SetValidationRule (LPCTSTR pstr);
  563. LONG GetRecordCount (VOID);
  564. CString GetConflictTable (VOID);
  565. COleVariant GetReplicaFilter (VOID);
  566. VOID SetReplicaFilter (LPVARIANT pv);
  567. // Methods
  568. CdbRecordset OpenRecordset (LONG lType=-1, LONG lOption=-1);
  569. VOID RefreshLink (VOID);
  570. CdbField CreateField (LPCTSTR pstrName=NULL, LONG lType=-1, LONG lSize=-1);
  571. CdbIndex CreateIndex (LPCTSTR pstrName=NULL);
  572. CdbProperty CreateProperty (LPCTSTR pstrName=NULL, LONG lType=-1, LPVARIANT pvValue=NULL, BOOL bDDL=FALSE);
  573. // Collections
  574. CdbFields Fields;
  575. CdbIndexes Indexes;
  576. };
  577. /*****************************************************************************
  578. * CdbIndex
  579. */
  580. class DLLEXPORT CdbIndex : public CdbObject
  581. {
  582. public:
  583. // Administration
  584. CONSTRUCTOR CdbIndex (VOID);
  585. CONSTRUCTOR CdbIndex (DAOIndex *pidx, BOOL bAddRef=FALSE);
  586. CONSTRUCTOR CdbIndex (const CdbIndex &);
  587. CdbIndex & operator = (const CdbIndex &);
  588. inline CdbField operator [] (LONG lIndex);
  589. inline CdbField operator [] (LPCTSTR pstrIndex);
  590. VOID OnInterfaceChange (VOID);
  591. // Properties
  592. CString GetName (VOID);
  593. VOID SetName (LPCTSTR pstr);
  594. BOOL GetForeign (VOID);
  595. BOOL GetUnique (VOID);
  596. VOID SetUnique (BOOL b);
  597. BOOL GetClustered (VOID);
  598. VOID SetClustered (BOOL b);
  599. BOOL GetRequired (VOID);
  600. VOID SetRequired (BOOL b);
  601. BOOL GetIgnoreNulls (VOID);
  602. VOID SetIgnoreNulls (BOOL b);
  603. BOOL GetPrimary (VOID);
  604. VOID SetPrimary (BOOL b);
  605. LONG GetDistinctCount (VOID);
  606. // Methods
  607. CdbField CreateField (LPCTSTR pstrName=NULL, LONG lType=-1, LONG lSize=-1);
  608. CdbProperty CreateProperty (LPCTSTR pstrName=NULL, LONG lType=-1, LPVARIANT pvValue=NULL, BOOL bDDL=FALSE);
  609. // Collections
  610. CdbIndexFields Fields;
  611. };
  612. /*****************************************************************************
  613. * CdbParameter
  614. */
  615. class DLLEXPORT CdbParameter : public CdbObject
  616. {
  617. public:
  618. // Administration
  619. CONSTRUCTOR CdbParameter (VOID);
  620. CONSTRUCTOR CdbParameter (DAOParameter *pprm, BOOL bAddRef=FALSE);
  621. CONSTRUCTOR CdbParameter (const CdbParameter &);
  622. CdbParameter & operator = (const CdbParameter &);
  623. VOID OnInterfaceChange (VOID);
  624. // Properties
  625. CString GetName (VOID);
  626. COleVariant GetValue (VOID);
  627. VOID SetValue (LPVARIANT pv);
  628. SHORT GetType (VOID);
  629. VOID SetType (SHORT i);
  630. SHORT GetDirection (VOID);
  631. VOID SetDirection (SHORT i);
  632. };
  633. /*****************************************************************************
  634. * CdbRelation
  635. */
  636. class DLLEXPORT CdbRelation : public CdbObject
  637. {
  638. public:
  639. // Administration
  640. CONSTRUCTOR CdbRelation (VOID);
  641. CONSTRUCTOR CdbRelation (DAORelation *prl, BOOL bAddRef=FALSE);
  642. CONSTRUCTOR CdbRelation (const CdbRelation &);
  643. CdbRelation & operator = (const CdbRelation &);
  644. inline CdbField operator [] (LONG lIndex);
  645. inline CdbField operator [] (LPCTSTR pstrIndex);
  646. VOID OnInterfaceChange (VOID);
  647. // Properties
  648. CString GetName (VOID);
  649. VOID SetName (LPCTSTR pstr);
  650. CString GetTable (VOID);
  651. VOID SetTable (LPCTSTR pstr);
  652. CString GetForeignTable (VOID);
  653. VOID SetForeignTable (LPCTSTR pstr);
  654. LONG GetAttributes (VOID);
  655. VOID SetAttributes (LONG);
  656. BOOL GetPartialReplica (VOID);
  657. VOID SetPartialReplica (BOOL b);
  658. // Methods
  659. CdbField CreateField (LPCTSTR pstrName=NULL, LONG lType=-1, LONG lSize=-1);
  660. // Collections
  661. CdbFields Fields;
  662. };
  663. /*****************************************************************************
  664. * CdbUser
  665. */
  666. class DLLEXPORT CdbUser : public CdbObject
  667. {
  668. public:
  669. // Administration
  670. CONSTRUCTOR CdbUser (VOID);
  671. CONSTRUCTOR CdbUser (DAOUser *pusr, BOOL bAddRef=FALSE);
  672. CONSTRUCTOR CdbUser (const CdbUser &);
  673. CdbUser & operator = (const CdbUser &);
  674. inline CdbGroup operator [] (LONG lIndex);
  675. inline CdbGroup operator [] (LPCTSTR pstrIndex);
  676. VOID OnInterfaceChange (VOID);
  677. // Properties
  678. CString GetName (VOID);
  679. VOID SetName (LPCTSTR pstr);
  680. VOID SetPID (LPCTSTR pstr);
  681. VOID SetPassword (LPCTSTR pstr);
  682. // Methods
  683. VOID NewPassword (LPCTSTR pstrOld, LPCTSTR pstrNew);
  684. CdbGroup CreateGroup (LPCTSTR pstrName=NULL, LPCTSTR pstrPID=NULL);
  685. // Collections
  686. CdbGroups Groups;
  687. };
  688. /*****************************************************************************
  689. * CdbGroup
  690. */
  691. class DLLEXPORT CdbGroup : public CdbObject
  692. {
  693. public:
  694. // Administration
  695. CONSTRUCTOR CdbGroup (VOID);
  696. CONSTRUCTOR CdbGroup (DAOGroup *pgrp, BOOL bAddRef=FALSE);
  697. CONSTRUCTOR CdbGroup (const CdbGroup &);
  698. CdbGroup & operator = (const CdbGroup &);
  699. inline CdbUser operator [] (LONG lIndex);
  700. inline CdbUser operator [] (LPCTSTR pstrIndex);
  701. VOID OnInterfaceChange (VOID);
  702. // Properties
  703. CString GetName (VOID);
  704. VOID SetName (LPCTSTR pstr);
  705. VOID SetPID (LPCTSTR pstr);
  706. // Methods
  707. CdbUser CreateUser (LPCTSTR pstrName=NULL, LPCTSTR pstrPID=NULL, LPCTSTR pstrPassword=NULL);
  708. // Collections
  709. CdbUsers Users;
  710. };
  711. /*****************************************************************************
  712. * CdbDocument
  713. */
  714. class DLLEXPORT CdbDocument : public CdbObject
  715. {
  716. public:
  717. // Administration
  718. CONSTRUCTOR CdbDocument (VOID);
  719. CONSTRUCTOR CdbDocument (DAODocument *pdoc, BOOL bAddRef=FALSE);
  720. CONSTRUCTOR CdbDocument (const CdbDocument &);
  721. CdbDocument & operator = (const CdbDocument &);
  722. VOID OnInterfaceChange (VOID);
  723. // Properties
  724. CString GetName (VOID);
  725. CString GetOwner (VOID);
  726. VOID SetOwner (LPCTSTR pstr);
  727. CString GetContainer (VOID);
  728. CString GetUserName (VOID);
  729. VOID SetUserName (LPCTSTR pstr);
  730. LONG GetPermissions (VOID);
  731. VOID SetPermissions (LONG l);
  732. COleDateTime GetDateCreated (VOID);
  733. COleDateTime GetLastUpdated (VOID);
  734. LONG GetAllPermissions (VOID);
  735. //Methods
  736. CdbProperty CreateProperty (LPCTSTR pstrName=NULL, LONG lType=-1, LPVARIANT pvValue=NULL, BOOL bDDL=FALSE);
  737. };
  738. /*****************************************************************************
  739. * CdbContainer
  740. */
  741. class DLLEXPORT CdbContainer : public CdbObject
  742. {
  743. public:
  744. // Administration
  745. CONSTRUCTOR CdbContainer (VOID);
  746. CONSTRUCTOR CdbContainer (DAOContainer *pctn, BOOL bAddRef=FALSE);
  747. CONSTRUCTOR CdbContainer (const CdbContainer &);
  748. CdbContainer & operator = (const CdbContainer &);
  749. inline CdbDocument operator [] (LONG lIndex);
  750. inline CdbDocument operator [] (LPCTSTR pstrIndex);
  751. VOID OnInterfaceChange (VOID);
  752. // Properties
  753. CString GetName (VOID);
  754. CString GetOwner (VOID);
  755. VOID SetOwner (LPCTSTR pstr);
  756. CString GetUserName (VOID);
  757. VOID SetUserName (LPCTSTR pstr);
  758. LONG GetPermissions (VOID);
  759. VOID SetPermissions (LONG l);
  760. BOOL GetInherit (VOID);
  761. VOID SetInherit (BOOL b);
  762. LONG GetAllPermissions (VOID);
  763. // Collections
  764. CdbDocuments Documents;
  765. };
  766. /*****************************************************************************
  767. * CdbError
  768. */
  769. class DLLEXPORT CdbError : public CdbObject
  770. {
  771. public:
  772. // Administration
  773. CONSTRUCTOR CdbError (VOID);
  774. CONSTRUCTOR CdbError (DAOError *perr, BOOL bAddRef=FALSE);
  775. CONSTRUCTOR CdbError (const CdbError &);
  776. CdbError & operator = (const CdbError &);
  777. VOID OnInterfaceChange (VOID);
  778. // Properties
  779. LONG GetNumber (VOID);
  780. CString GetSource (VOID);
  781. CString GetDescription (VOID);
  782. CString GetHelpFile (VOID);
  783. LONG GetHelpContext (VOID);
  784. };
  785. /*****************************************************************************
  786. * CdbProperty
  787. */
  788. class DLLEXPORT CdbProperty : public CdbObject
  789. {
  790. public:
  791. // Administration
  792. CONSTRUCTOR CdbProperty (VOID);
  793. CONSTRUCTOR CdbProperty (DAOProperty *pprp, BOOL bAddRef=FALSE);
  794. CONSTRUCTOR CdbProperty (const CdbProperty &);
  795. CdbProperty & operator = (const CdbProperty &);
  796. // Properties
  797. COleVariant GetValue (VOID);
  798. VOID SetValue (LPVARIANT pv);
  799. CString GetName (VOID);
  800. VOID SetName (LPCTSTR pstrName);
  801. SHORT GetType (VOID);
  802. VOID SetType (SHORT sType);
  803. BOOL GetInherited (VOID);
  804. };
  805. /*****************************************************************************
  806. * Inline functions
  807. */
  808. inline BOOL CdbOleObject::Exists(void)
  809. {
  810. return (m_punkInterface ? TRUE : FALSE);
  811. }
  812. /*****************************************************************************
  813. * Recordset GetField functions
  814. */
  815. inline VOID CdbRecordset::GetFieldV(
  816. COleVariant &vIndex,
  817. COleVariant &vValue)
  818. {
  819. DAORecordset * prs = (DAORecordset *)GetInterface();
  820. if (!prs)
  821. {
  822. DAOVINIT(vValue);
  823. return;
  824. }
  825. DAOMFC_CALL(prs->get_Collect(vIndex, &vValue));
  826. return;
  827. }
  828. inline VOID CdbRecordset::SetFieldV(
  829. COleVariant &vIndex,
  830. LPVARIANT pv)
  831. {
  832. DAORecordset * prs = (DAORecordset *)GetInterface();
  833. if (!prs)
  834. return;
  835. DAOMFC_CALL(prs->put_Collect(vIndex, *pv));
  836. }
  837. /*****************************************************************************
  838. * Default collection operators
  839. */
  840. inline CdbWorkspace CdbDBEngine::operator []
  841. (LONG lIndex)
  842. {
  843. return Workspaces[lIndex];
  844. }
  845. inline CdbWorkspace CdbDBEngine::operator []
  846. (LPCTSTR pstrIndex)
  847. {
  848. return Workspaces[pstrIndex];
  849. }
  850. inline CdbDatabase CdbWorkspace::operator []
  851. (LONG lIndex)
  852. {
  853. return Databases[lIndex];
  854. }
  855. inline CdbDatabase CdbWorkspace::operator []
  856. (LPCTSTR pstrIndex)
  857. {
  858. return Databases[pstrIndex];
  859. }
  860. inline CdbTableDef CdbDatabase::operator []
  861. (LONG lIndex)
  862. {
  863. return TableDefs[lIndex];
  864. }
  865. inline CdbTableDef CdbDatabase::operator []
  866. (LPCTSTR pstrIndex)
  867. {
  868. return TableDefs[pstrIndex];
  869. }
  870. inline CdbQueryDef CdbConnection::operator []
  871. (LONG lIndex)
  872. {
  873. return QueryDefs[lIndex];
  874. }
  875. inline CdbQueryDef CdbConnection::operator []
  876. (LPCTSTR pstrIndex)
  877. {
  878. return QueryDefs[pstrIndex];
  879. }
  880. inline CdbField CdbRecordset::operator []
  881. (LONG lIndex)
  882. {
  883. return Fields[lIndex];
  884. }
  885. inline CdbField CdbRecordset::operator []
  886. (LPCTSTR pstrIndex)
  887. {
  888. return Fields[pstrIndex];
  889. }
  890. inline CdbField CdbTableDef::operator []
  891. (LONG lIndex)
  892. {
  893. return Fields[lIndex];
  894. }
  895. inline CdbField CdbTableDef::operator []
  896. (LPCTSTR pstrIndex)
  897. {
  898. return Fields[pstrIndex];
  899. }
  900. inline CdbField CdbQueryDef::operator []
  901. (LONG lIndex)
  902. {
  903. return Fields[lIndex];
  904. }
  905. inline CdbField CdbQueryDef::operator []
  906. (LPCTSTR pstrIndex)
  907. {
  908. return Fields[pstrIndex];
  909. }
  910. inline CdbField CdbIndex::operator []
  911. (LONG lIndex)
  912. {
  913. return Fields[lIndex];
  914. }
  915. inline CdbField CdbIndex::operator []
  916. (LPCTSTR pstrIndex)
  917. {
  918. return Fields[pstrIndex];
  919. }
  920. inline CdbField CdbRelation::operator []
  921. (LONG lIndex)
  922. {
  923. return Fields[lIndex];
  924. }
  925. inline CdbField CdbRelation::operator []
  926. (LPCTSTR pstrIndex)
  927. {
  928. return Fields[pstrIndex];
  929. }
  930. inline CdbGroup CdbUser::operator []
  931. (LONG lIndex)
  932. {
  933. return Groups[lIndex];
  934. }
  935. inline CdbGroup CdbUser::operator []
  936. (LPCTSTR pstrIndex)
  937. {
  938. return Groups[pstrIndex];
  939. }
  940. inline CdbUser CdbGroup::operator []
  941. (LONG lIndex)
  942. {
  943. return Users[lIndex];
  944. }
  945. inline CdbUser CdbGroup::operator []
  946. (LPCTSTR pstrIndex)
  947. {
  948. return Users[pstrIndex];
  949. }
  950. inline CdbDocument CdbContainer::operator []
  951. (LONG lIndex)
  952. {
  953. return Documents[lIndex];
  954. }
  955. inline CdbDocument CdbContainer::operator []
  956. (LPCTSTR pstrIndex)
  957. {
  958. return Documents[pstrIndex];
  959. }
  960. /*****************************************************************************
  961. * Use different DAO interface for wide (UNICODE) versions
  962. */
  963. #ifdef _UNICODE
  964. #define dbIID_IDAODBEngine IID_IDAODBEngineW
  965. #define dbIID_IDAOError IID_IDAOErrorW
  966. #define dbIID_IDAOErrors IID_IDAOErrorsW
  967. #define dbIID_IDAOProperty IID_IDAOPropertyW
  968. #define dbIID_IDAOProperties IID_IDAOPropertiesW
  969. #define dbIID_IDAORecordset IID_IDAORecordsetW
  970. #define dbIID_IDAORecordsets IID_IDAORecordsetsW
  971. #define dbIID_IDAOWorkspace IID_IDAOWorkspaceW
  972. #define dbIID_IDAOWorkspaces IID_IDAOWorkspacesW
  973. #define dbIID_IDAOConnection IID_IDAOConnectionW
  974. #define dbIID_IDAOConnections IID_IDAOConnectionsW
  975. #define dbIID_IDAOTableDef IID_IDAOTableDefW
  976. #define dbIID_IDAOTableDefs IID_IDAOTableDefsW
  977. #define dbIID_IDAOField IID_IDAOFieldW
  978. #define dbIID_IDAOFields IID_IDAOFieldsW
  979. #define dbIID_IDAOIndex IID_IDAOIndexW
  980. #define dbIID_IDAOIndexes IID_IDAOIndexesW
  981. #define dbIID_IDAOIndexFields IID_IDAOIndexFieldsW
  982. #define dbIID_IDAOGroup IID_IDAOGroupW
  983. #define dbIID_IDAOGroups IID_IDAOGroupsW
  984. #define dbIID_IDAOUser IID_IDAOUserW
  985. #define dbIID_IDAOUsers IID_IDAOUsersW
  986. #define dbIID_IDAODatabase IID_IDAODatabaseW
  987. #define dbIID_IDAODatabases IID_IDAODatabasesW
  988. #define dbIID_IDAOQueryDef IID_IDAOQueryDefW
  989. #define dbIID_IDAOQueryDefs IID_IDAOQueryDefsW
  990. #define dbIID_IDAOParameter IID_IDAOParameterW
  991. #define dbIID_IDAOParameters IID_IDAOParametersW
  992. #define dbIID_IDAORelation IID_IDAORelationW
  993. #define dbIID_IDAORelations IID_IDAORelationsW
  994. #define dbIID_IDAOContainer IID_IDAOContainerW
  995. #define dbIID_IDAOContainers IID_IDAOContainersW
  996. #define dbIID_IDAODocument IID_IDAODocumentW
  997. #define dbIID_IDAODocuments IID_IDAODocumentsW
  998. #else
  999. #define dbIID_IDAODBEngine IID_IDAODBEngine
  1000. #define dbIID_IDAOError IID_IDAOError
  1001. #define dbIID_IDAOErrors IID_IDAOErrors
  1002. #define dbIID_IDAOProperty IID_IDAOProperty
  1003. #define dbIID_IDAOProperties IID_IDAOProperties
  1004. #define dbIID_IDAORecordset IID_IDAORecordset
  1005. #define dbIID_IDAORecordsets IID_IDAORecordsets
  1006. #define dbIID_IDAOWorkspace IID_IDAOWorkspace
  1007. #define dbIID_IDAOWorkspaces IID_IDAOWorkspaces
  1008. #define dbIID_IDAOConnection IID_IDAOConnection
  1009. #define dbIID_IDAOConnections IID_IDAOConnections
  1010. #define dbIID_IDAOTableDef IID_IDAOTableDef
  1011. #define dbIID_IDAOTableDefs IID_IDAOTableDefs
  1012. #define dbIID_IDAOField IID_IDAOField
  1013. #define dbIID_IDAOFields IID_IDAOFields
  1014. #define dbIID_IDAOIndex IID_IDAOIndex
  1015. #define dbIID_IDAOIndexes IID_IDAOIndexes
  1016. #define dbIID_IDAOIndexFields IID_IDAOIndexFields
  1017. #define dbIID_IDAOGroup IID_IDAOGroup
  1018. #define dbIID_IDAOGroups IID_IDAOGroups
  1019. #define dbIID_IDAOUser IID_IDAOUser
  1020. #define dbIID_IDAOUsers IID_IDAOUsers
  1021. #define dbIID_IDAODatabase IID_IDAODatabase
  1022. #define dbIID_IDAODatabases IID_IDAODatabases
  1023. #define dbIID_IDAOQueryDef IID_IDAOQueryDef
  1024. #define dbIID_IDAOQueryDefs IID_IDAOQueryDefs
  1025. #define dbIID_IDAOParameter IID_IDAOParameter
  1026. #define dbIID_IDAOParameters IID_IDAOParameters
  1027. #define dbIID_IDAORelation IID_IDAORelation
  1028. #define dbIID_IDAORelations IID_IDAORelations
  1029. #define dbIID_IDAOContainer IID_IDAOContainer
  1030. #define dbIID_IDAOContainers IID_IDAOContainers
  1031. #define dbIID_IDAODocument IID_IDAODocument
  1032. #define dbIID_IDAODocuments IID_IDAODocuments
  1033. #endif
  1034. #endif // _DBDAO_H_