Partager via


CDaoQueryDef::GetConnect

Call this member function to get the connection string associated with the querydef's data source.

CString GetConnect( );

Return Value

A CString containing the connection string for the querydef.

Remarks

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.

Conseil

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.

For information about connection strings, see the topic "Connect Property" in DAO Help.

Requirements

Header: afxdao.h

See Also

Concepts

CDaoQueryDef Class

CDaoQueryDef Members

Hierarchy Chart