如何通过C#2010将数据库文件添加到我的EXE安装文件中 [英] How can add data base file to my EXE setup file by C#2010

查看:97
本文介绍了如何通过C#2010将数据库文件添加到我的EXE安装文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

请帮帮我



我用c#2010开发windows应用程序

i使用LINQ SQL类通过SQL 2005连接数据库

并且无法知道我是如何创建数据库文件的在用户PC中设置我的exe文件以及应用程序在用户PC上运行时如何连接数据库文件

Hi All
please Help me

I Develope windows Applcation program by c# 2010
i use LINQ to SQL class to connect data base by SQL 2005
but When i make setup project , database file not exist in project
and can't know how i do database file created in user PC when setup my exe file and how the application connect with database file when run at user PC

推荐答案

如果数据库是SQL Server的多用户安装,最好与程序分开安装。在这种情况下,SQL Server安装在网络中的某个服务器上一次。然后根据需要再次安装客户端应用程序。



但如果您使用的是SQL Server Compact版本,则它是嵌入式单用户版本,可以包含在内按照 http://erikej.blogspot中的说明进行设置。 fi / 2011/02 / using-sql-server-compact-40-with.html [ ^ ]
If the database is a multi user installation of SQL Server, it's better to install separately from the program. In such case the SQL Server is installed on a server somewhere in the network, once. The client applications then again are installed as many times as needed.

But if you're using SQL Server Compact edition, it's an embedded single user version and can be included in the setup by following the instructions in http://erikej.blogspot.fi/2011/02/using-sql-server-compact-40-with.html[^]


这篇关于如何通过C#2010将数据库文件添加到我的EXE安装文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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