virtual CString GetDefaultDBName( );
Return Value
A CString that contains the path and name of the database from which this recordset is derived.
Remarks
Call this member function to determine the name of the database for this recordset. If a recordset is created without a pointer to a CDaoDatabase, then this path is used by the recordset to open the default database. By default, this function returns an empty string. When ClassWizard derives a new recordset from CDaoRecordset, it will create this function for you.
The following example illustrates the use of the double backslash (\\) in the string, as is required for the string to be interpreted correctly.
CString CMyRecordset::GetDefaultDBName(void)
{
return _T("c:\\mydir\\datasrc.mdb");
}
For more information about connecting to databases, see the article DAO: Creating, Opening, and Closing DAO Objects in Visual C++ Programmer's Guide.
CDaoRecordset Overview | Class Members | Hierarchy Chart
See Also CDaoRecordset::GetDefaultSQL, CDaoRecordset::GetName, CDaoRecordset::GetSQL, CDaoRecordset::GetType