Compartilhar via


CRecordset::GetTableName

Gets the name of the SQL table on which the recordset's query is based.

const CString& GetTableName( ) const;

Return Value

A const reference to a CString that contains the table name, if the recordset is based on a table; otherwise, an empty string.

Remarks

GetTableName is only valid if the recordset is based on a table, not a join of multiple tables or a predefined query (stored procedure). The name is read-only.

Note

Call this member function only after calling Open.

Requirements

Header: afxdb.h

See Also

Reference

CRecordset Class

Hierarchy Chart