以编程方式将MySQL数据库添加到ODBC [英] Add MySQL Database to the ODBC Programmatically

查看:75
本文介绍了以编程方式将MySQL数据库添加到ODBC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经编写了一个使用Crystal Report的小型C#应用程序.我将odbc连接用于水晶报表.
问题是,在部署应用程序并将其安装到另一台计算机上之后,我必须先手动将数据库连接到System DSN ODBC,然后才能生成报告.我想知道如何以编程方式将mysql数据库添加到ODBC.请它紧急.如果有人可以帮助我,我将不胜感激.谢谢

I have written a small c# application that makes use of crystal report. I used the odbc connectivity for the crystal report.
The problem is that after deploying the application and want to install it on another machine i have to manually connect the database to the System DSN ODBC before the report can be generated. I would like to know how to add a mysql database programmatically to the ODBC. Its urgent please. I would be happy if anyone could be of help to me i would be very grateful. Thanks

推荐答案

我建​​议使用安装程序.从免费的WIX或任何其他工具开始.

否则-使用reg.文件写入注册表.
甚至从.NET中-编写负责任的注册表数据.

http://msdn.microsoft.com/zh-cn/library/windows/desktop/ms714818(v = vs.85).aspx
I suggest using installation program. Start from free WIX or any other tool.

Otherwise - use reg. file to write in to the registry.
Or even from .NET - write responsible registry data.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms714818(v=vs.85).aspx


这篇关于以编程方式将MySQL数据库添加到ODBC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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