CDatabase

MyFamily654482 2012-11-26 11:03:17
链接数据库成功了,数据库中有个字段名叫书名,我怎么样才能通过VC 中的CDatabase或者其他类的API 取出书名这个字段中的所有值呢?
如果是用CDatabase中的ExcuteSQL,那怎么在程序中把执行sql语句后的值存储在变量中呢 ?
求答。
...全文
99 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2012-11-26
  • 打赏
  • 举报
回复
查MSDN是Windows程序员必须掌握的技能之一。 mk:@MSITStore:C:\MSDN98\98VS\2052\vcsample.chm::/html/_sample_mfc_enroll.htm ENROLL: A Sample MFC Database Application Click to open or copy STEP1 Click to open or copy STEP2 Click to open or copy STEP3 Click to open or copy STEP4 ENROLL is an example of a Microsoft Foundation Class Library (MFC) database application. The ENROLL sample has four subdirectories, named STEP1, STEP2, STEP3 and STEP4. The first three subdirectories correspond to steps in theDatabase Tutorial. STEP4, which adds more advanced features to the ENROLL database application, is not discussed in the tutorial but is discussed below. The first three steps of ENROLL illustrate the following. Code created by the AppWizard database option. CRecordset and CRecordView classes. Using MFC database classes in conjunction with the framework's document/view architecture. Adding, updating, and deleting database records. Handling database exceptions. STEP4 of ENROLL illustrates the following. Using multiple CRecordView-derived classes. Switching views in a frame window. Using update hints and CDocument::UpdateAllViews to coordinate multiple record views. ENROLL STEP4 has the same user interface as ENROLL STEP3, with the addition of a new Form menu and a Course form. The Form menu lets you toggle between the Sections form and the Course form. When you add or delete a course in the Course form, the change is automatically reflected in the list of courses displayed in the dialog box in the Section form. Note To run the ENROLL application, you must first set up the Student Registration Database and register it with ODBC. For information about how to do this, seeSetting Up the Student Registration Data Source.

64,661

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧