The CDaoDatabaseInfo structure has the following form:
struct CDaoDatabaseInfo
{
CString m_strName; // Primary
BOOL m_bUpdatable; // Primary
BOOL m_bTransactions; // Primary
CString m_strVersion; // Secondary
long m_lCollatingOrder; // Secondary
short m_nQueryTimeout; // Secondary
CString m_strConnect; // All
};
The CDaoDatabaseInfo structure contains information about a database object defined for data access objects (DAO). The database is a DAO object underlying an MFC object of class CDaoDatabase. The references to Primary, Secondary, and All above indicate how the information is returned by the CDaoWorkspace::GetDatabaseInfo member function.
Members
m_strName
Uniquely names the database object. To directly retrieve this property, call CDaoDatabase::GetName. For details, see the topic "Name Property" in DAO Help.
m_bUpdatable
Indicates whether changes can be made to the database. To directly retrieve this property, call CDaoDatabase::CanUpdate. For details, see the topic "Updatable Property" in DAO Help.
m_bTransactions
Indicates whether a data source supports transactions — the recording of a series of changes that can later be rolled back (canceled) or committed (saved). If a database is based on the Microsoft Jet database engine, the Transactions property is nonzero and you can use transactions. Other database engines may not support transactions. To directly retrieve this property, call CDaoDatabase::CanTransact. For details, see the topic "Transactions Property" in DAO Help.
m_strVersion
Indicates the version of the Microsoft Jet database engine. To retrieve the value of this property directly, call the database object’s GetVersion member function. For details, see the topic "Version Property" in DAO Help.
m_lCollatingOrder
Specifies the sequence of the sort order in text for string comparison or sorting. Possible values include:
For more information, see the topic "Customizing Windows Registry Settings for Data Access" in DAO Help.
m_nQueryTimeout
The number of seconds the Microsoft Jet database engine waits before a timeout error occurs when a query is run on an ODBC database. The default timeout value is 60 seconds. When QueryTimeout is set to 0, no timeout occurs; this can cause the program to hang. To retrieve the value of this property directly, call the database object’s GetQueryTimeout member function. For details, see the topic "QueryTimeout Property" in DAO Help.
m_strConnect
Provides information about the source of an open database. For information about connect strings, and for information about retrieving the value of this property directly, see the CDaoDatabase::GetConnect member function. For more information, see the topic "Connect Property" in DAO Help.
Comments
Information retrieved by the CDaoWorkspace::GetDatabaseInfo member function is stored in a CDaoDatabaseInfo structure. Call GetDatabaseInfo for the CDaoWorkspace object in whose Databases collection the database object is stored. CDaoDatabaseInfo also defines a Dump member function in debug builds. You can use Dump to dump the contents of a CDaoDatabaseInfo object.
For information on using this and other MFC DAO Info structures, see the article DAO Collections: Obtaining Information About DAO Objects in Visual C++ Programmer's Guide.
See Also CDaoWorkspace, CDaoDatabase, CDaoWorkspace::GetDatabaseCount