home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / database / daotable / readme.txt < prev    next >
Text File  |  1998-03-26  |  4KB  |  112 lines

  1. DAOTable--DAO Database, TableDef, and QueryDef Creation
  2.  
  3. -----------------------------------------------------------------------
  4. The information in this article applies to:
  5.  
  6.   - The Microsoft Foundation Classes (MFC), included with:
  7.       - Microsoft Visual C++, 32-bit Edition, version 4.0
  8. -----------------------------------------------------------------------
  9.  
  10. SUMMARY
  11. =======
  12.  
  13. The DAOTable sample demonstrates using the MFC DAO classes to create
  14. common database objects:  Databases, Tables, Queries, Fields, and
  15. Indexes.  This dialog-based application maps the properties of these
  16. objects to controls the user can set and/or view.  The program source
  17. code is organized so that most database interaction is isolated from
  18. the user interface code to ease finding examples of how to use MFC DAO.
  19.  
  20. In addition to demonstrating the use of the MFC DAO classes, this
  21. sample can be a useful tool for creating simple Access databases.
  22. You can create MDB files from scratch, create and delete tables and
  23. queries, add and delete fields and indexes in the tables, and modify
  24. existing queries.
  25.  
  26. The following files contain the code which performs the database
  27. operations.  Additional files in the project provide the user
  28. interface and high level database manipulation.
  29.  
  30.     QUERYDEF.CPP, .H -- functions to create and use queries
  31.     TABLEDEF.CPP, .H -- functions to create and use tables
  32.     FIELD.CPP, .H    -- functions to create and use fields
  33.     INDEX.CPP, .H    -- functions to create and use indexes
  34.     DATABASE.CPP, .H -- functions to create and use databases
  35.  
  36. To use this code and the MFC DAO classes you must have version
  37. 4.0 or greater of Visual C++.
  38.  
  39. To get the code for this sample, download DAOTBL.EXE, a self-
  40. extracting file, from the Microsoft Software Library (MSL) on the
  41. following services:
  42.  
  43. NOTE: The file must be decompressed by typing "DAOTBL.EXE -d".
  44.  
  45.  - CompuServe
  46.       GO MSL
  47.       Search for DAOTBL.EXE
  48.       Display results and download
  49.  
  50.  - Microsoft Download Service (MSDL)
  51.       Dial (206) 936-6735 to connect to MSDL
  52.       Download DAOTBL.EXE
  53.  
  54.  - Internet (anonymous FTP)
  55.       ftp ftp.microsoft.com
  56.       Change to the SOFTLIB\MSLFILES directory
  57.       Get DAOTBL.EXE
  58.  
  59. MORE INFORMATION
  60. ================
  61.  
  62. The MFC DAO classes provide a means of directly using the Jet Database
  63. Engine.  While Visual C++'s wizards automatically generate code that
  64. will create and open recordsets for you based on implicitly created
  65. database and workspace objects, the code they provide does not
  66. demonstrate creating and manipulating MFC DAO objects directly. With
  67. MFC DAO classes you can create the majority of DAO objects and set
  68. their properties.
  69.  
  70. This sample demonstrates using the MFC DAO classes to create and use
  71. the following DAO objects: Databases, Tables, Queries, Fields, and
  72. Indexes.  Exception handling with both MFC exception macros and the C++
  73. exception mechanism is also shown.  Further, DAO exceptions are put to
  74. use in detecting the existence of objects in the DAO collections.
  75.  
  76. Listed below are all the files in the project (except those which are
  77. common to all Visual C++ projects).  Each file is shown with the type
  78. of components it contains and a brief description
  79.  
  80. ADDQYDLG.CPP         - USER INTERFACE - query definition dialog
  81. ADDQYDLG.H
  82. DAOTABLE.CPP         - APPLICATION - main application objects
  83. DAOTABLE.H
  84. DAOTDLG.CPP          - USER INTERFACE - main dialog
  85. DAOTDLG.H
  86. DATABASE.CPP         - MFC DAO - database specific functions
  87. DATABASE.H             (also demonstrates C++ exception handling)
  88. ADDIXDLG.CPP         - USER INTERFACE - add indexes dialog
  89. ADDIXDLG.H
  90. ADDTBDLG.CPP         - USER INTERFACE - table definition dialog
  91. ADDTBDLG.H
  92. FIELD.CPP            - MFC DAO - field specific functions
  93. FIELD.H
  94. LISTCTRL.CPP         - USER INTERFACE - derived CListCtrl class
  95. LISTCTRL.H
  96. INDEX.CPP            - MFC DAO - index specific functions
  97. INDEX.H
  98. QUERYDEF.CPP         - MFC DAO - querydef specific functions
  99. QUERYDEF.H
  100. TABLEDEF.CPP         - MFC DAO - tabledef specific functions
  101. TABLEDEF.H
  102. ADDDBDLG.CPP         - USER INTERFACE - database definition dialog
  103. ADDDBDLG.H
  104.  
  105.  
  106. REFERENCES
  107. ==========
  108.  
  109. For more information about the MFC DAO classes, refer to the on-line
  110. help for Visual C++ 4.0.  For additional documentation on DAO, refer to
  111. the help files in the DAO SDK which is provided on the VC++ 4.0 CD-ROM.
  112.