Link to home
Start Free TrialLog in
Avatar of tdietz
tdietz

asked on

Opening a Table with CDaoRecordset

I have derived a class from CDaoRecordset that should access a table in an Access database (Access 97).  The table exists however it is empty.

Instead of doing a query, I want to add an entry to this table.  So I call Open() (with no parameters).  Unfortunately I get an exception that says:

"Too few parameters, expected 1."

I assume calling "Open" will open the table so I can use the "AddNew()" method.  The table was generated via ClassWizard so the default table and database name are hard-coded.
ASKER CERTIFIED SOLUTION
Avatar of Tommy Hui
Tommy Hui

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mmachie
mmachie

Remember CDaoTableDef is only valid for table-type recordsets.  Are you  sure you bound the columns you want?