CDaoQueryDef::GetConnect

CString GetConnect( );
throw( CDaoException, CMemoryException );

Return Value

A CString containing the connect string for the querydef.

Remarks

Call this member function to get the connect string associated with the querydef’s data source. This function is used only with ODBC data sources and certain ISAM drivers. It is not used with Microsoft Jet (.MDB) databases; in this case, GetConnect returns an empty string. For more information, see SetConnect.

Tip   The preferred way to work with ODBC tables is to attach them to an .MDB database. For more information, see the topic "Accessing External Databases with DAO" in DAO Help and the article DAO External: Working with External Data Sources in Visual C++ Programmer's Guide.

For information about connect strings, see the topic "Connect Property" in DAO Help. For information about querydefs, see the article DAO Querydef in Visual C++ Programmer's Guide.

CDaoQueryDef OverviewClass MembersHierarchy Chart