如何在窗口应用程序中远程使用SQL Server数据库 [英] How to use an SQL server database remotely in window application

查看:99
本文介绍了如何在窗口应用程序中远程使用SQL Server数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个应该在局域网上运行的软件。应该使用位于服务器系统上的数据库,这样可以使分布式软件正常工作。



我尝试过的方法:



< connectionstrings>

< add name =ConnectionString>

connectionString =Data Source = .\sqlexpress; Initial Catalog = MemberDB; Integrated Security = True; Pooling = False providerName =System.Data.SqlClient/>

I create a software that should work on a LAN. The database located on the server system should be used so that this can be distributed software working.

What I have tried:

<connectionstrings>
<add name="ConnectionString">
connectionString="Data Source=.\sqlexpress;Initial Catalog=MemberDB;Integrated Security=True;Pooling=False" providerName="System.Data.SqlClient"/>

推荐答案

请参阅ConnectionStrings.com了解各种连接字符串 - 下面链接SQL;



[ ConnectionStrings.com ]

典型的连接字符串是;

Server = myServer \ myInstance; DataBase = myDbName;用户ID = myUser;密码= myPassword;

如何存储,检索&编辑价值取决于你。



亲切的问候
Refer to ConnectionStrings.com for various connection strings - link below for SQL;

[ConnectionStrings.com]
A typical connection string would be;
Server=myServer\myInstance;DataBase=myDbName;User Id=myUser;Password=myPassword;
How you store, retrieve & edit the values is up to you.

Kind Regards


这篇关于如何在窗口应用程序中远程使用SQL Server数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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