使用C#创建数据库 [英] Create Database using C#

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

问题描述

使用C#创建数据库



我用C#编写软件,该软件应该(单独)创建一个新数据库.
SQL Server应该以静默方式安装在客户的计算机上
(我仍然需要弄清楚如何做这部分)
我的软件如何创建只能访问的数据库?我
需要从该软件创建一个特殊的用户帐户吗?
在打开
中与SQL Server的连接时,我使用什么用户帐户? 创建数据库时的第一名(考虑中
SQL服务器已以静默方式安装,并已安装到用户
担心他不知道我的软件使用SQL Server).

总结一下:
1.我的软件的安装应安装并配置SQL
服务器无提示(感谢任何帮助)
2.软件需要访问本地SQL服务器并创建一个
软件运行时只有它可以访问的数据库

Create Database Using C#

Hi,

I write software in C# that should create (by itself) a new database.
The SQL server should be installed on the customer''s computers silently
(I still need to figure how to do this part)
How can my software create a database that only it can access? Do I
need to create a special user account from the software?
What user account do I use to open a connection to the SQL server in
the first place when I create the database (taking under consideration
that the SQL server was installed silently and as far as the user
concern he has no idea my software uses SQL server).

To summarize:
1.The install of my software should install and configure the SQL
server silently (appreciate any help here)
2.The software needs to access the local SQL server and create a
database that only it can access when the software runs

推荐答案

您不应在客户计算机上安装SQL Server:唯一可以安装的版本是Express版本-全部其他的则需要付费-并且他们可能已经将其安装在另一台服务器上.相反,请询问您的用户,如果他还没有该版本,请指出他的位置.
You should not install SQL server on the customer computer: the only version you could install is the Express version - all the others need to be paid for - and they may have it installed already on another server. Instead, ask your user, and point him at where to get the express version if he doesn''t have it yet.


这是非法的.您无权安装其他Microsoft产品.用您的程序.

使用Visual Studio设置安装sql服务器数据库
This is illegal.You are not authorized to install another Microsoft product with your program.

Install sql server database with visual studio setup


我认为您应该尝试XML数据库系统.
I think you should try XML databse system.


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

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