Navigation:  DAO Object Classes > DaoDatabase Class >

DaoDatabase:CreateTableDef() Method

Previous pageReturn to chapter overviewNext page

Purpose

Creates a new Tabledef object

 

Parameters

cName(Optional) A string that uniquely names the new Tabledef object.
liAtttributes(Optional) A constant or combination of constants that indicates one or more characteristics of the new TableDef object
cSource(Optional) A string containing the name of a table in an external database that is the original source of the data. The source string becomes the SourceTableName property setting of the new TableDef object.
cConnect(Optional) A string containing information about the source of an open database, a database used in a pass-through query, or a linked table. See the Connect property for more information about valid connection strings.

 

Returns

A Tabledef object

 

Remarks

If you omit one or more of the optional arguments when you use the CreateTableDef method, you can use an appropriate assignment statement to set or reset the corresponding property before you append the new object to a collection. After you append the object, you can alter some but not all of its properties. See the individual property topics for more details.

 

liAttributes can be a combination of these constants.

ConstantDescription

 

dbAttachExclusiveFor databases that use the Microsoft Jet database engine, the table is a linked table opened for exclusive use. You can set this constant on an appended TableDef object for a local table, but not on a remote table.
dbAttachSavePWDFor databases that use the Microsoft Jet database engine, the user ID and password for the remotely linked table are saved with the connection information. You can set this constant on an appended TableDef object for a remote table, but not on a local table.
dbSystemObjectThe table is a system table provided by the Microsoft Jet database engine. You can set this constant on an appended TableDef object.
dbHiddenObjectThe table is a hidden table provided by the Microsoft Jet database engine. You can set this constant on an appended TableDef object.
dbAttachedTableThe table is a linked table from a non-ODBC data source such as a Microsoft Jet or Paradox database (read-only).
dbAttachedODBCThe table is a linked table from an ODBC data source, such as Microsoft SQL Server (read-only).

 

Class

DaoDatabase

 

Example

Database sample