20 lines
1.6 KiB
Plaintext
20 lines
1.6 KiB
Plaintext
{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\froman Times New Roman;}}
|
||
{\colortbl\red0\green0\blue0;\red255\green0\blue0;\red0\green0\blue128;}
|
||
\deflang1033\pard\qc\plain\f2\fs36\cf1\b COXDAO Class
|
||
\par \pard\plain\f2\fs20
|
||
\par \plain\f2\fs24\cf2\b Overview
|
||
\par \plain\f2\fs20
|
||
\par This class wrapps all of MFCs standard DAO classes (CDaoDatabase, CDaoTableDef, CDaoQueryDef and CDaoRecordset) into one easy to use class. All of the necessary DAO classes are created and mantained internally. The most commonly used features are exposed through this class, plus there is easy access to the internal objects if extra functionality is required. For a general DAO overview please refer to the On-Line help supplied with Visual C++.
|
||
\par
|
||
\par This class is very straight forward to use and allows for common database tasks to be accomplished in only a couple lines of code. The first step is to create a database object of type COXDao. Next open the database using either the COXDao::Open or COXDao::OpenSQL commands. Once opened the database is ready for use. Once finished with the database the object can be destroyed, this closes any open database automatically. Also you can reuse the same database object multiple times, since the\~ COXDao::Open or COXDao::OpenSQL commands will automatically close any previously opened database.
|
||
\par
|
||
\par
|
||
\par \plain\f2\fs20\b Example
|
||
\par \plain\f2\fs20
|
||
\par \plain\f2\fs20\i COXDao dao;
|
||
\par CString string;
|
||
\par
|
||
\par dao.OpenSQL("c:\\\\MyDatabase.mdb","SELECT * from MyTable");
|
||
\par dao.GetField("LastName",string);
|
||
\par }
|
||
|