如何创建.bak文件或.mdf文件并将其包含在安装文件中 [英] how to create a .bak file or .mdf file and include it in the setup file

查看:142
本文介绍了如何创建.bak文件或.mdf文件并将其包含在安装文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个场景,我正在创建一个可以安装在客户端计算机上的Windows应用程序。应用程序将从客户端获取数据,并将其附加到客户端计算机本地存在的.bak文件中(应在客户端计算机上执行安装文件时创建.bak文件),稍后将更新.bak文件手动使用主数据库服务器.....

我的问题是,如何创建.bak文件或.mdf(其中任何一个都可以工作)并将其包含在安装文件中。

,客户端机器是否必须安装数据库服务器实例?

我正在使用SQL Server 2008和Visual Studio 2010,C#。





任何帮助都表示赞赏。

Hi all,
I have a scenario where I'm creating a windows application that can be installed on the client machine. The application will take the data from the client and should append it in a .bak file present locally on the client machine(.bak file should be created while setup file is executed on client machine), later the .bak file will be updated in the main database server manually.....
My question is, how to create a .bak file or .mdf(any of them will work) and include it in the setup file.
also, is it mandatory that the client machine should have database server instance installed on it??
am using SQL server 2008 and Visual Studio 2010, C#.


any help is appreciated.

推荐答案

是的,很明显,你的bak文件没用SQL Server已安装。 SQL Server精简版解决了小型数据库设计的所有这些问题。否则,您需要人员安装和配置SQL Server,然后在您的应用程序中配置连接字符串。我已经完成了这个,我只是在默认实例上默认为localhost连接,并发送脚本来创建/填充我的数据库,而不是.bak文件。
Yes, obvioulsly, your bak file is useless without SQL Server installed. SQL Server compact edition solves all these issues for smaller DB designs. Otherwise, you need people to install and configure SQL Server, and then configure a connection string in your app. I've done this, I just defaulted to a localhost connection on the default instance, and shipped scripts to create/populate my DB, not a .bak file.


这篇关于如何创建.bak文件或.mdf文件并将其包含在安装文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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