Fields not longer available when subclassing the _RecordsetPtr cla

From: Marc G (G_at_discussions.microsoft.com)
Date: 01/21/05


Date: Fri, 21 Jan 2005 13:11:04 -0800

I am using VC++ with ADO using the import pragma to access a local Access
database with multiple tables. This access works correctly using Fields->.
I would like to subclass _RecordsetPtr to create different classes specific
to each table and to add functions to them (which are different for each
table). In DAO every recordset class corresponds to a single table, and I
would like something similar for ADO. After subclassing, the compiler no
longer recognizes the Fields object. Classes are created with
class TypeOneRecordSet :: public _RecordsetPtr {
 void DoSomethingTypeOne (void); }
class TypeTwoRecordSet :: public _RecordsetPtr {
 void DoSomethingTypeTwo (void); }
Error reports Fields not a member of a complicated COM object.