使用C#中的应用程序发布数据库

问题描述:

我开发了一个C#应用程序,它使用数据库添加成员和程序并对其进行管理。在开发应用程序时,所有这些在调试阶段都可以正常工作。我想知道。当我发布这个应用程序时,当应用程序的用户在计算机上安装SQL应用程序时,如何让SQL数据库与应用程序一起安装?



当然连接数据库的路径不能留在localhost上吗?



有人可以提供正确的方式来发布您的应用程序,这样当您的数据库安装在另一台计算机上时,它就是应用程序的一部分。



问候,

Chris

I have a C# application that I developed that uses a database to add members and programs and manage them. All of this works fine in the debug stage while developing the application. I am wondering though. When I publish this application, how am I going to let the SQL database install with the application when the users of the application install it on their computer?

Surely the paths to connect to the database and such cant be left on "localhost" can it?

Can someone please provide me with the correct way to publish your application so your database is kind of part of the application when installed on another computer.

Regards,
Chris

嗨Smit,



我认为这个链接 [ ^ ]会对你有所帮助。



谢谢,

Rk
Hi Smit,

I think this link[^] would help you a bit.

Thanks,
R.k.