CDaoRecordset to edit multiple tables
Posted on 1998-10-09
I have an Access DB with 3 tables. I used the ClassWizard to create a class derived from the base class of CDaoRecordset. My goal is to write records to the three tables, however, within "CDaoRecordset::GetDefaultSQL()" , I am only allowed to define 1 table name to edit. Hence, the only solution I can clearly see is to create 3 different CDaoRecordset classes and open and close the .mdb file each time I need to switch to a different table. That way seems very inefficient. Is it possible to access different tables within the same file and class? How? I am just starting to learn about databases, so any code would also be a big help.