窗口应用程序连接串 [英] window application connection string

查看:69
本文介绍了窗口应用程序连接串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在服务器中使用相同的窗口应用程序。服务器工作正常,但客户端工作但服务器机器中的SQL数据库,客户端机器无法访问或连接服务器机器数据库。此服务器机器sql连接字符串 -

I use same window application in server and. server work fine but client working but sql database in server machine, client machine not access or connect server machine database. this server machine sql connection string -

<add name="ConnectionStrings">
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Soft SolutionASD\Soft Solution\Data\MediDataNew.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" providerName="System.Data.SqlClient"</add>



plz建议我如何将客户端机器连接到服务器机器数据库。在客户端机器上写入哪种类型的sql连接。



ReplyQuick回复


plz suggest me how to connect client machine to server machine database. which type sql connection write in client machine.

ReplyQuick Reply

推荐答案

你需要使用Sql Server身份验证

使用代码

You need to use Sql Server Authentication
Use the code
Data Source={server ip}\SQLExpress;Database=TestDB;User Id=UserID;Password=myPassword;



并且在服务器上从Sql Server配置管理器启用了Sure TCP / IP。


and Make Sure TCP/IP is enabled on server from Sql Server Configuration Manager.


您无法访问远程SQL Server除非您在配置中进行了必要的更改。



检查这些链接 -

如何从其他计算机访问SQL Server数据库 [ ^ ]

如何:在SQL Server配置管理器(SQL Server Express)中启用网络访问 [ ^ ]

从另一台计算机连接 [

希望,这些有帮助:)
You can't access remote SQL Server unless you made the required changes in the configuration.

Check these links-
How to access a SQL Server database from other computer[^]
How to: Enable Network Access in SQL Server Configuration Manager (SQL Server Express)[^]
Connecting from Another Computer[^]

Hope, these helps :)


您好,请参阅以下CodeProject答案,它可能对您有所帮助,

1.
我该怎么办?多台计算机通过本地网络在C#中使用我的库存系统 [ ^ ]

2. H创建Windows c#应用程序以在线和离线工作 [ ^ ]
Hi, refer the following CodeProject Answers, it may helpful to you,
1. how can I use my inventory system in C# by a multi computer through Local network[^]
2. How to Create windows c# application to work online and offline[^]


这篇关于窗口应用程序连接串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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