如何从我的SQL服务器连接和访问数据? [英] How to connect and access data from my sql server?

查看:166
本文介绍了如何从我的SQL服务器连接和访问数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个小型项目,它是用C#windows窗体应用程序构建的。

并使用Sql server 2008,现在我正在测试sql server中的所有东西,但是当我将这个应用程序安装到使用我的sql数据库的客户端时。然后我的应用程序如何在我的sql数据库上工作 - 我有userid,密码和服务器名称所有连接所需的信息。但我的应用程序是否在那里工作?





请回答我对此有很大疑问?

I am working on one small project , which is build in C# windows form application.
and uses Sql server 2008 , now I am currently testing all things in sql server but when I installed this application to client side who uses my sql database. then how my application works on there my sql database - I have userid , password and server name all information which is necessary for connection . but Is my application working on there database?


please answer I have huge doubt about this?

推荐答案

在配置文件中的适当位置配置连接字符串



连接字符串和配置文件 [ ^ ]



部署时在他们的服务器上,您可以更改配置中的连接字符串,使其与其sql服务器匹配。你也需要你的数据库。
You configure your connection string in the appropriate place in the config file

Connection Strings and Configuration Files[^]

When you deploy to their servers you change the connection string in the config such that it matches their sql server. You'll need your database on there too.


这篇关于如何从我的SQL服务器连接和访问数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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