C#SQL expres备份数据库 [英] C# SQL expres Backup database

查看:62
本文介绍了C#SQL expres备份数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好gyus我遇到了一个问题但我找不到答案,我在Visual Studio 2012中创建了一个带有内部数据库(基于服务的数据库)的程序 - 在我的客户端PC上安装后,它将作为本地数据库工作(我还在客户端pc中安装了SQL EXPRES 2008和SQL LOCAL DB),他希望我对程序进行一些更改,现在即将面临如何备份程序中保存数据的问题,因为我无法更新程序,我必须卸载它并再次安装。





我搜索了所有的论坛,但仍然没有找到任何有用的东西,所以请别人帮助我。

Hello gyus im facing a problem and i cant find the answer yet, i created a program in Visual Studio 2012 with an internal database (Service Based Database)- that will work as a local database, after installing it in my Clients PC (i also installed SQL EXPRES 2008 and SQL LOCAL DB in clients pc), he wanted me to make some changes in the program, now im facing a problem how to Backup the saved data on the Program, because i cant update the program, i must uninstall it and install it again.


ive searched all the forums but still nothing useful found yet, so pls someone help me.

推荐答案

您想要使用数据库进行设置吗?检查这个

如何部署C# Windows应用程序使用Sql Server? [ ^ ]



或者您想给他更新现有数据库中的更改?几种方式

0)制作数据库脚本文件&你可以直接执行那个

1)创建一个批处理文件&使用 sqlcmd Utility [ ^ ]

2)创建一个简单的UI表单连接现有数据库,在按钮点击调用执行数据库脚本文件



现在你决定哪一个是安全的/更好的为你。
You want to make a setup with database? check this
How to deploy C# windows application With Sql Server?[^]

Or you want to give him an update to do changes in existing database? Couple of ways
0) Make a database script file & you could directly execute that
1) Create a batch file & execute the database script using sqlcmd Utility[^]
2) Make a simple UI form which connects the existing database, in button click call the execute database script file

Now you decide which one is secure/better for you.


这篇关于C#SQL expres备份数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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