共用方式為


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.

注意

Call this member function only after calling Open.

Requirements

Header: afxdb.h

See Also

Concepts

CRecordset Class

CRecordset Members

Hierarchy Chart