首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

怎么在一个新建的MFC基于对话框的 Dlg上实现连接ODBC //万谢!

2012-01-28 
如何在一个新建的MFC基于对话框的 Dlg上实现连接ODBC//万谢!!我想用VC++6做一个小词典就是用一个DLG连上词

如何在一个新建的MFC基于对话框的 Dlg上实现连接ODBC //万谢!!
我想用VC++6   做一个小词典  
就是用一个DLG连上词典的ACCESS库
我试过建立一个 'CRecordset '   类连我的ODBC,一运行,就出现了如下错误,请高手指点一二!!
万谢!!
/*//////////////////////////////////////cetset就是我新建的 'CRecordset '
cetset.h(14)   :   error   C2504:   'CRecordset '   :   base   class   undefined  
cetset.h(16)   :   error   C2629:   unexpected   'class   cet   ( '
cetset.h(16)   :   error   C2238:   unexpected   token(s)   preceding   '; '
cetset.h(33)   :   error   C2061:   syntax   error   :   identifier   'CFieldExchange '
cetset.cpp(17)   :   error   C2653:   'CRecordset '   :   is   not   a   class   or   namespace   name
cetset.cpp(17)   :   error   C2065:   'classCRecordset '   :   undeclared   identifier
cetset.cpp(19)   :   error   C2065:   'CDatabase '   :   undeclared   identifier
cetset.cpp(19)   :   error   C2065:   'pdb '   :   undeclared   identifier
cetset.cpp(20)   :   error   C2448:   ' <Unknown> '   :   function-style   initializer   appears   to   be   a   function   definition
cetset.cpp(20)   :   error   C2143:   syntax   error   :   missing   '; '   before   ': '
cetset.cpp(21)   :   error   C2448:   ' <Unknown> '   :   function-style   initializer   appears   to   be   a   function   definition
cetset.cpp(42)   :   error   C2065:   'CFieldExchange '   :   undeclared   identifier
cetset.cpp(42)   :   error   C2065:   'pFX '   :   undeclared   identifier
cetset.cpp(43)   :   error   C2448:   ' <Unknown> '   :   function-style   initializer   appears   to   be   a   function   definition
cetset.cpp(58)   :   error   C2653:   'CRecordset '   :   is   not   a   class   or   namespace   name
cetset.cpp(63)   :   error   C2653:   'CRecordset '   :   is   not   a   class   or   namespace   name
*////////////////////////////////////

[解决办法]
#include <afxdb.h>

热点排行