文件名称:MFCDB
介绍说明--下载内容均来自于网络,请自行研究使用
C++连接数据库有很多种方法,ODBC,ADO等等。我这里就采用了ADO的方法。
既然都涉及到数据库了,就直接做个带界面的吧。先打开VS2010,新建一个“MFC应用程序”,在里面记得选择“基于对话框”,因为这个比较简单,我就用这个举例了,其他的自己研究一下吧,然后一直下一步就可以了。-There are many ways C++ connect to the database, ODBC, ADO, etc.. I am here on the use of the method of the ADO. That relates to the database, to be a band interface directly. First open the VS2010, create a new MFC application, remember to choose " dialog-based" , because this is relatively simple, I' ll use this example, own it then have been the next step will be inside.
既然都涉及到数据库了,就直接做个带界面的吧。先打开VS2010,新建一个“MFC应用程序”,在里面记得选择“基于对话框”,因为这个比较简单,我就用这个举例了,其他的自己研究一下吧,然后一直下一步就可以了。-There are many ways C++ connect to the database, ODBC, ADO, etc.. I am here on the use of the method of the ADO. That relates to the database, to be a band interface directly. First open the VS2010, create a new MFC application, remember to choose " dialog-based" , because this is relatively simple, I' ll use this example, own it then have been the next step will be inside.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
MFCDataBase
...........\C++连接数据库.docx
...........\MFCDataBase
...........\MFCDataBase.sln
...........\MFCDataBase.suo
...........\...........\DataBaseADO.cpp
...........\...........\DataBaseADO.h
...........\...........\MFCDataBase.aps
...........\...........\MFCDataBase.cpp
...........\...........\MFCDataBase.h
...........\...........\MFCDataBase.rc
...........\...........\MFCDataBase.vcxproj
...........\...........\MFCDataBase.vcxproj.filters
...........\...........\MFCDataBase.vcxproj.user
...........\...........\MFCDataBaseDlg.cpp
...........\...........\MFCDataBaseDlg.h
...........\...........\ReadMe.txt
...........\...........\res
...........\...........\resource.h
...........\...........\...\MFCDataBase.ico
...........\...........\...\MFCDataBase.rc2
...........\...........\stdafx.cpp
...........\...........\stdafx.h
...........\...........\targetver.h