C#与MS SQL DB的交互 [英] C# with MS SQL DB interaction

查看:102
本文介绍了C#与MS SQL DB的交互的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的专家,

我正在编写一个C#应用程序,它将动态创建MS SQL DB(.mdf文件)并与之交互.从网上的一些资料中,我知道要创建数据库并执行查询,我需要安装MS SQl Server 2008或2005(在我的情况下,要求是MS SQL Server 2008).

我的问题是
1.我们可以在安装应用程序期间提供SQL库吗?
2.如果是,如果我的系统中只有SQL库,我是否无法创建和执行SQL查询?


预先谢谢大家.

Dear Experts,

I''m writing an C# application which will dynamically create and interact with MS SQL DB (.mdf file). From some source in net i came to know that to create DB and execute Query I need to install MS SQl Server 2008 or 2005 ( in my case requirment is MS SQL Server 2008).

My Question is that
1. Can we provide the SQL libraries during installation of our application?
2. If So, Cann''t i create and execute the SQL Query if i''ve only SQL libraries in my system?


Thank you all in advance.

推荐答案

Microsoft SQL连接库是.net的一部分,因此,如果在目标计算机上安装.net,则无需执行任何操作.他们还没有.
Microsoft SQL connection libraries are part of .net, so you do not need to do anything but install .net on your target machine if they don''t already have it.


1.我们可以在安装应用程序期间提供SQL库吗?
正如 Mehdi Gholam 写道:不,你不知道.

2.如果是这样,如果我的系统中只有SQL库,我是否可以创建和执行SQL查询?
不,你不能.您需要安装 MS SQL Server [
1. Can we provide the SQL libraries during installation of our application?
As Mehdi Gholam wrote: No, you don''t.

2. If So, Cann''t i create and execute the SQL Query if i''ve only SQL libraries in my system?
No, you can''t. You need to install MS SQL Server[^] on local computer, unless you have a permission to the MS SQL server in network.


亲爱的全部,

请帮我.
要在Loacl MS Server(.mdf文件)中创建数据库,我是否需要安装服务器.
Dear All,

Please help me.
For creating db in Loacl MS Server (.mdf file), do i need to install the server.


这篇关于C#与MS SQL DB的交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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