Partilhar via


CDaoTableDef::SetAttributes

Sets a value that indicates one or more characteristics of a CDaoTableDef object.

void SetAttributes( 
   long lAttributes  
);

Parameters

  • lAttributes
    Characteristics of the table represented by the CDaoTableDef object and can be a sum of these constants:

    Constant

    Description

    dbAttachExclusive

    For databases that use the Microsoft Jet database engine, indicates the table is an attached table opened for exclusive use.

    dbAttachSavePWD

    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.

    dbSystemObject

    Indicates the table is a system table provided by the Microsoft Jet database engine.

    dbHiddenObject

    Indicates the table is a hidden table provided by the Microsoft Jet database engine.

Remarks

When setting multiple attributes, you can combine them by summing the appropriate constants using the bitwise-OR operator. Setting dbAttachExclusive on a nonattached table produces an exception. Combining the following values also produce an exception:

  • dbAttachExclusive | dbAttachedODBC

  • dbAttachSavePWD | dbAttachedTable

For related information, see the topic "Attributes Property" in DAO Help.

Requirements

Header: afxdao.h

See Also

Reference

CDaoTableDef Class

Hierarchy Chart

CDaoTableDef::SetConnect

Other Resources

CDaoTableDef Members