DOC: Append Instructions for DAO TableDef Incorrect (184511)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC)
- Microsoft Visual C++ 4.0
This article was previously published under Q184511 SUMMARY
In the "DAO TableDef: Using TableDefs" section appearing under
Visual C++ Books
MFC 4.0
Programming with MFC Encyclopedia
DAO TableDef
of the Visual C++ 4.0 documentation, the following set of instructions are
given on how to create a TableDef:
To create a tabledef.
- Construct a CDaoTableDef object, supplying a pointer to the
CDaoDatabase object to which the tabledef will belong.
- Call the tabledef object's Create member function.
- Set any of the tabledef object's properties that you want. Call the
SetAttributes, SetConnect, SetName, SetSourceTableName,
SetValidationRule, or SetValidationText member functions.
- Call the tabledef object's Append member function to save the
tabledef in the database's TableDefs collection. You can append
before or after creating fields, as described in the next step.
- Add fields to the tabledef by calling its CreateField member function
for each field. (You can not modify the schema of an attached table,
so this step applies only to local base tables and tables in external
data sources that you open directly.)
- Optionally add indexes to the tabledef by calling its CreateIndex
member function for each index.
The fourth step is out of sequence and contains incorrect information.
Modification Type: | Major | Last Reviewed: | 10/17/2003 |
---|
Keywords: | kbdocerr kbdocfix kbhowto kbnofix KB184511 |
---|
|