如何在c#winform中创建设置 [英] how to create setup in c# winform

查看:131
本文介绍了如何在c#winform中创建设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hii,

我为我的项目创建了一个包含数据库的设置。但是当我在我的朋友PC中安装该设置时,它给出了关于数据库的错误。是否有任何解决方案?

hii,
I had created a setup for my project which includes database.But when I installed that setup in my friends PC it gave an error regarding database.Is there any solution for this?

推荐答案

是 - 很可能您的设置中没有数据库驱动程序,或者您的朋友PC上的数据库连接选项设置不同。



要解决此问题,您可以使用您的应用程序开发数据库系统(注意 - 重新分发数据库系统可能会导致许可证侵权)。或者,如果您的数据库是基于文件的,您必须使用您的应用程序开发文件,包括所有其他东西,如连接器等。



如果您需要进一步说明,请发布错误消息以及您正在使用哪种制造商的数据库。





欢呼,

Marco Bertschi
Yes - Most likely there was no database driver in your setup included or the database'' connection options were set differently on your friends PC.

To resolve this issue you can either develop the database system with your app (watch out - redistributing database systems may cause licence infringment). Or, if your database is file-based you have to develop the file with your application including all the other stuff such as connectors etc.

If you need further clarification please post the error message and what kind of database from which manufacturer you are using.


cheers,
Marco Bertschi


Mate,



错误可能是由于两个原因:



1)你的朋友没有在他的机器上安装SQL服务器。

2)或者,你项目中的连接字符串仍然指向你的机器和数据库。 br />


如果其他机器上没有安装SQL服务器,你可以下载免费的教育版本并将其安装在那台机器上。



对于第二个原因的解决方案,您可以在他的机器中手动更改连接字符串,也可以在项目中使用另一个表单来询问对于用户的机器名称,数据库名称和单击按钮创建相应的连接字符串。



试试吧..希望它有帮助..



-Anurag
Mate,

The error might be due to 2 reasons:

1) Your friend does not have SQL server installed in his machine.
2) Or, the connection string which you have in your project still points to your machine and database.

If the other machine does not have SQL server installed in it, you can download the free educational version and install it in that machine.

For resolution of 2nd reason, you can either change the connection string manually in his machine or you can have another form in your project which asks for the user''s machine name, database name and on a button click creates the appropriate connection string.

Try it..Hope it helps..

-Anurag


这篇关于如何在c#winform中创建设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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