error C2504: 'CRecordset' : base class undefined

Visual C++ 6.0 添加一个类, 基类为CRecordset, 连接ODBC数据库编译出现如下错误:

error C2504: 'CRecordset' : base class undefined

解决方法:

在FileView里打StdAfx.h里添加头文件#include <afxdb.h>