如何在visualc ++ 6.0中创建一个mysql作为后端的对话框表单 [英] how to create a dialog form with mysql as backend in visualc++ 6.0

查看:100
本文介绍了如何在visualc ++ 6.0中创建一个mysql作为后端的对话框表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个以mysql为背景的对话框表格。

I need to create a dialog form with mysql as background..

推荐答案





溶剂应该是非常向前的。我不知道你的知识量,所以我知道哪个部分( MFC 在C ++中使用MySQL ... )对你来说是最大的麻烦。所以我将简要介绍一下这个解决方案。



首先你需要创建新的MFC应用程序。这可以通过Visual Studio MFC向导完成。或者你可以手工制作(这可能是一个非常糟糕的工作)。



当你有一个带有主窗口(或对话框)的应用程序时,你需要添加一个组件来显示SQL查询的结果。该组件可以是例如 ListView 控件或者通过派生手动开发的一些控件来自其他MFC课程。



完成后,您需要连接到MySQL数据库。这可以通过用于C ++的MySQL连接器来完成,这是一个用于访问MySQL数据库的SDK。您可以在此处找到安装和文档。



最后,您只需向数据库发送一个SQL查询,结果会收到一个记录集,并接收结果集的行作为上述组件的项目。



希望这会有所帮助。



祝你好运,

JK
Hi,

the sollution shall be quite atraight-forward. I am not aware of the amount of your knowledge, so I dount know which part (MFC or using MySQL in C++ or ...) is the biggest trouble for you. So I will describe the sollution briefly.

First you need to create new MFC application. That can be done by a Visual Studio MFC Wizard. Or you can do it manualy (which can be a pretty hack of work).

When you have the application with a main window (or Dialog), you need to add a component for displaying the results of SQL queries. This component can be e.g. a ListView control or some contrl taht you manually develop by deriving from other MFC classes.

WHen done, you need to connect to MySQL database. This can be done by a MySQL connector for C++, which is a SDK for accessing MySQL databases. You can find the install and also documentation here.

And finally, you just send a SQL query to the database, you receive a recordset as a result and receive rows of the resultset as items of the component described above.

Hope this helps.

Best regards,
J.K


这篇关于如何在visualc ++ 6.0中创建一个mysql作为后端的对话框表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆