Call this member function to create a new saved table.
virtual void Create( LPCTSTR lpszName, long lAttributes = 0, LPCTSTR lpszSrcTable = NULL, LPCTSTR lpszConnect = NULL );
A pointer to a string containing the name of the table.
A value corresponding to characteristics of the table represented by the tabledef object. You can use the bitwise-OR to combine any of the following constants:
For databases that use the Microsoft Jet database engine, indicates the table is an attached table opened for exclusive use.
For databases that use the Microsoft Jet database engine, indicates that the user ID and password for the attached table are saved with the connection information.
Indicates the table is a system table provided by the Microsoft Jet database engine.
Indicates the table is a hidden table provided by the Microsoft Jet database engine.
A pointer to a string containing the source table name. By default this value is initialized as NULL.
A pointer to a string containing the default connection string. By default this value is initialized as NULL.
Once you have named the tabledef, you can then call Append to save the tabledef in the database's TableDefs collection. After calling Append, the tabledef is in an open state, and you can use it to create a CDaoRecordset object.
For related information, see the topic "CreateTableDef Method" in DAO Help.