This documentation is archived and is not being maintained.


The framework calls this member function to get the default SQL statement on which the recordset is based.

virtual CString GetDefaultSQL( );

Return Value

A CString that contains the default SQL statement.


This might be a table name or a SQL SELECT statement.

You indirectly define the default SQL statement by declaring your recordset class with ClassWizard, and ClassWizard performs this task for you.

If you pass a null SQL string to Open, then this function is called to determine the table name or SQL for your recordset.

For more information about connecting to databases, see the article DAO: Creating, Opening, and Closing DAO Objects.

See Also

CDaoRecordset Overview | Class Members | Hierarchy Chart | CDaoRecordset::GetDefaultDBName | CDaoRecordset::GetName | CDaoRecordset::GetSQL | CDaoRecordset::GetType