Greetings!
I have the following code:
Base class header file:
Derived class header file:Code:class ADODIRECT_API CADODirectRecordset : public CADORecordset { public: long GetLastID(const CCOMString& sequenceName); }
Derived class implementation:Code:class _OPERATIONSPLANNERSET_CLASS_EXPORT COperationsTaskSet : public CADODirectRecordset { public: long GetLastID(); }
When I compile this, my compiler complains that COperationsTaskSet::GetLastID() does not accept 1 argument. I had expected that it would see the one-argument version of GetLastID() defined in the base class. Why doesn't it?Code:long COperationsTaskSet::GetLastID() { return GetLastID(_T("operations_task_id_seq")); }
If I qualify the function name with the base class name, it works:
I'm sure I learned about this many years ago, and forgot it. Thank you for refreshing my memory.Code:long COperationsTaskSet::GetLastID() { return CADODirectRecordset::GetLastID(_T("operations_task_id_seq")); }
RobR


Reply With Quote



Bookmarks