dbdao.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:49k
源码类别:

模拟服务器

开发平台:

C/C++

  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 //  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. return (m_punkInterface ? TRUE : FALSE);
  810. }
  811. /*****************************************************************************
  812. *  Recordset GetField functions
  813. */
  814. inline VOID CdbRecordset::GetFieldV(
  815. COleVariant &vIndex,
  816. COleVariant &vValue)
  817. {
  818. DAORecordset *  prs     = (DAORecordset *)GetInterface();
  819. if (!prs)
  820. {
  821. DAOVINIT(vValue);
  822. return;
  823. }
  824. DAOMFC_CALL(prs->get_Collect(vIndex, &vValue));
  825. return;
  826. }
  827. inline VOID CdbRecordset::SetFieldV(
  828. COleVariant &vIndex, 
  829. LPVARIANT pv)
  830. {
  831. DAORecordset *  prs     = (DAORecordset *)GetInterface();
  832. if (!prs)
  833. return;
  834. DAOMFC_CALL(prs->put_Collect(vIndex, *pv));
  835. }
  836. /*****************************************************************************
  837. * Default collection operators
  838. */
  839. inline CdbWorkspace CdbDBEngine::operator []
  840. (LONG lIndex)
  841. {
  842. return Workspaces[lIndex];
  843. }
  844. inline CdbWorkspace CdbDBEngine::operator []
  845. (LPCTSTR pstrIndex)
  846. {
  847. return Workspaces[pstrIndex];
  848. }
  849. inline CdbDatabase CdbWorkspace::operator []
  850. (LONG lIndex)
  851. {
  852. return Databases[lIndex];
  853. }
  854. inline CdbDatabase CdbWorkspace::operator []
  855. (LPCTSTR pstrIndex)
  856. {
  857. return Databases[pstrIndex];
  858. }
  859. inline CdbTableDef      CdbDatabase::operator []
  860. (LONG lIndex)
  861. {
  862. return TableDefs[lIndex];
  863. }
  864. inline CdbTableDef      CdbDatabase::operator []
  865. (LPCTSTR pstrIndex)
  866. {
  867. return TableDefs[pstrIndex];
  868. }
  869. inline CdbQueryDef      CdbConnection::operator []
  870. (LONG lIndex)
  871. {
  872. return QueryDefs[lIndex];
  873. }
  874. inline CdbQueryDef      CdbConnection::operator []
  875. (LPCTSTR pstrIndex)
  876. {
  877. return QueryDefs[pstrIndex];
  878. }
  879. inline CdbField      CdbRecordset::operator []
  880. (LONG lIndex)
  881. {
  882. return Fields[lIndex];
  883. }
  884. inline CdbField      CdbRecordset::operator []
  885. (LPCTSTR pstrIndex)
  886. {
  887. return Fields[pstrIndex];
  888. }
  889. inline CdbField CdbTableDef::operator []        
  890. (LONG lIndex)
  891. {
  892. return Fields[lIndex];
  893. }
  894. inline CdbField CdbTableDef::operator []        
  895. (LPCTSTR pstrIndex)
  896. {
  897. return Fields[pstrIndex];
  898. }
  899. inline CdbField CdbQueryDef::operator []        
  900. (LONG lIndex)
  901. {
  902. return Fields[lIndex];
  903. }
  904. inline CdbField CdbQueryDef::operator []        
  905. (LPCTSTR pstrIndex)
  906. {
  907. return Fields[pstrIndex];
  908. }
  909. inline CdbField CdbIndex::operator []   
  910. (LONG lIndex)
  911. {
  912. return Fields[lIndex];
  913. }
  914. inline CdbField CdbIndex::operator []   
  915. (LPCTSTR pstrIndex)
  916. {
  917. return Fields[pstrIndex];
  918. }
  919. inline CdbField CdbRelation::operator []
  920. (LONG lIndex)
  921. {
  922. return Fields[lIndex];
  923. }
  924. inline CdbField CdbRelation::operator []
  925. (LPCTSTR pstrIndex)
  926. {
  927. return Fields[pstrIndex];
  928. }
  929. inline CdbGroup CdbUser::operator []
  930. (LONG lIndex)
  931. {
  932. return Groups[lIndex];
  933. }
  934. inline CdbGroup CdbUser::operator []
  935. (LPCTSTR pstrIndex)
  936. {
  937. return Groups[pstrIndex];
  938. }
  939. inline CdbUser CdbGroup::operator []
  940. (LONG lIndex)
  941. {
  942. return Users[lIndex];
  943. }
  944. inline CdbUser CdbGroup::operator []
  945. (LPCTSTR pstrIndex)
  946. {
  947. return Users[pstrIndex];
  948. }
  949. inline CdbDocument CdbContainer::operator []
  950. (LONG lIndex)
  951. {
  952. return Documents[lIndex];
  953. }
  954. inline CdbDocument CdbContainer::operator []
  955. (LPCTSTR pstrIndex)
  956. {
  957. return Documents[pstrIndex];
  958. }
  959. /*****************************************************************************
  960. *  Use different DAO interface for wide (UNICODE) versions
  961. */
  962. #ifdef _UNICODE
  963. #define dbIID_IDAODBEngine IID_IDAODBEngineW
  964. #define dbIID_IDAOError IID_IDAOErrorW
  965. #define dbIID_IDAOErrors IID_IDAOErrorsW
  966. #define dbIID_IDAOProperty IID_IDAOPropertyW
  967. #define dbIID_IDAOProperties IID_IDAOPropertiesW
  968. #define dbIID_IDAORecordset IID_IDAORecordsetW
  969. #define dbIID_IDAORecordsets IID_IDAORecordsetsW
  970. #define dbIID_IDAOWorkspace IID_IDAOWorkspaceW
  971. #define dbIID_IDAOWorkspaces IID_IDAOWorkspacesW
  972. #define dbIID_IDAOConnection IID_IDAOConnectionW
  973. #define dbIID_IDAOConnections IID_IDAOConnectionsW
  974. #define dbIID_IDAOTableDef IID_IDAOTableDefW
  975. #define dbIID_IDAOTableDefs IID_IDAOTableDefsW
  976. #define dbIID_IDAOField IID_IDAOFieldW
  977. #define dbIID_IDAOFields IID_IDAOFieldsW
  978. #define dbIID_IDAOIndex IID_IDAOIndexW
  979. #define dbIID_IDAOIndexes IID_IDAOIndexesW
  980. #define dbIID_IDAOIndexFields IID_IDAOIndexFieldsW
  981. #define dbIID_IDAOGroup IID_IDAOGroupW
  982. #define dbIID_IDAOGroups IID_IDAOGroupsW
  983. #define dbIID_IDAOUser IID_IDAOUserW
  984. #define dbIID_IDAOUsers IID_IDAOUsersW
  985. #define dbIID_IDAODatabase IID_IDAODatabaseW
  986. #define dbIID_IDAODatabases IID_IDAODatabasesW
  987. #define dbIID_IDAOQueryDef IID_IDAOQueryDefW
  988. #define dbIID_IDAOQueryDefs IID_IDAOQueryDefsW
  989. #define dbIID_IDAOParameter IID_IDAOParameterW
  990. #define dbIID_IDAOParameters IID_IDAOParametersW
  991. #define dbIID_IDAORelation IID_IDAORelationW
  992. #define dbIID_IDAORelations IID_IDAORelationsW
  993. #define dbIID_IDAOContainer IID_IDAOContainerW
  994. #define dbIID_IDAOContainers IID_IDAOContainersW
  995. #define dbIID_IDAODocument IID_IDAODocumentW
  996. #define dbIID_IDAODocuments IID_IDAODocumentsW
  997. #else
  998. #define dbIID_IDAODBEngine IID_IDAODBEngine
  999. #define dbIID_IDAOError IID_IDAOError
  1000. #define dbIID_IDAOErrors IID_IDAOErrors
  1001. #define dbIID_IDAOProperty IID_IDAOProperty
  1002. #define dbIID_IDAOProperties IID_IDAOProperties
  1003. #define dbIID_IDAORecordset IID_IDAORecordset
  1004. #define dbIID_IDAORecordsets IID_IDAORecordsets
  1005. #define dbIID_IDAOWorkspace IID_IDAOWorkspace
  1006. #define dbIID_IDAOWorkspaces IID_IDAOWorkspaces
  1007. #define dbIID_IDAOConnection IID_IDAOConnection
  1008. #define dbIID_IDAOConnections IID_IDAOConnections
  1009. #define dbIID_IDAOTableDef IID_IDAOTableDef
  1010. #define dbIID_IDAOTableDefs IID_IDAOTableDefs
  1011. #define dbIID_IDAOField IID_IDAOField
  1012. #define dbIID_IDAOFields IID_IDAOFields
  1013. #define dbIID_IDAOIndex IID_IDAOIndex
  1014. #define dbIID_IDAOIndexes IID_IDAOIndexes
  1015. #define dbIID_IDAOIndexFields IID_IDAOIndexFields
  1016. #define dbIID_IDAOGroup IID_IDAOGroup
  1017. #define dbIID_IDAOGroups IID_IDAOGroups
  1018. #define dbIID_IDAOUser IID_IDAOUser
  1019. #define dbIID_IDAOUsers IID_IDAOUsers
  1020. #define dbIID_IDAODatabase IID_IDAODatabase
  1021. #define dbIID_IDAODatabases IID_IDAODatabases
  1022. #define dbIID_IDAOQueryDef IID_IDAOQueryDef
  1023. #define dbIID_IDAOQueryDefs IID_IDAOQueryDefs
  1024. #define dbIID_IDAOParameter IID_IDAOParameter
  1025. #define dbIID_IDAOParameters IID_IDAOParameters
  1026. #define dbIID_IDAORelation IID_IDAORelation
  1027. #define dbIID_IDAORelations IID_IDAORelations
  1028. #define dbIID_IDAOContainer IID_IDAOContainer
  1029. #define dbIID_IDAOContainers IID_IDAOContainers
  1030. #define dbIID_IDAODocument IID_IDAODocument
  1031. #define dbIID_IDAODocuments IID_IDAODocuments
  1032. #endif
  1033. #endif // _DBDAO_H_