无法从 PocketPC (Windows Mobile 6) 打开到 SQL Server 2005 的连接

发布于 2024-11-29 13:27:49 字数 390 浏览 1 评论 0原文

我正在尝试从袖珍电脑应用程序(Windows Mobile 6)连接到 SQL Server 2005,但无论我如何努力,它都不起作用。我检查了在 SQL Server 上启用 tcp 的所有可能的配置,我测试了许多连接字符串,但当我尝试打开连接时仍然遇到问题,我确信这不是网络问题,因为我可以从服务器计算机没有任何问题,并且我的服务器计算机上的防火墙被禁用:这是我使用的连接字符串之一:

Data Source=10.168.0.160,1433;Initial Catalog=pos;Trusted_connection=yes;user id=myuserid;password=mypassword

其中 pos 是我的数据库的名称

谢谢您的帮助

I'm trying to connect from a pocket pc app (windows mobile 6) to a SQL Server 2005, but no matter how hard I try it didn't work. I checked every possible configuration for enabling tcp on SQL Server, I tested many connection strings, but still have the problem when I attempt to open the connection, I'm sure it's not a network issue because I can ping on my pocket pc from the server machine without any problem and the firewall on my server machine is disabled : here is one of the connection strings I used :

Data Source=10.168.0.160,1433;Initial Catalog=pos;Trusted_connection=yes;user id=myuserid;password=mypassword

where pos is the name of my database

Thank you for your help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你的往事 2024-12-06 13:27:49

那么,您不能同时拥有可信连接和指定显式用户名和密码 - 要么是要么。

要么使用可信连接(例如您的 Windows 凭据)连接到服务器 - 那么您的连接字符串如下所示:

Data Source=10.168.0.160,1433;Initial Catalog=pos;Integrated Security=SSPI;

或者,您使用显式用户名和密码- 但在这种情况下,您不能同时使用可信连接/集成安全!

在这种情况下,您的连接字符串将类似于:

Data Source=10.168.0.160,1433;Initial Catalog=pos;user id=myuserid;password=mypassword

查看 ConnectionStrings.com 以获取有效连接的示例负载SQL Server 的字符串

Well, you cannot have both a trusted connection and specify an explicit user name and password at the same time - it's either or.

EITHER you connect to your server with the trusted connection, e.g. your Windows credentials - then your connection string looks something like this:

Data Source=10.168.0.160,1433;Initial Catalog=pos;Integrated Security=SSPI;

OR alternatively, you use an explicit user name and password - but in that case, you CANNOT also use trusted connection / integrated security at the same time!

In this case, your connection string would be something like:

Data Source=10.168.0.160,1433;Initial Catalog=pos;user id=myuserid;password=mypassword

Check out the ConnectionStrings.com for loads of samples of valid connection strings for SQL Server

夢归不見 2024-12-06 13:27:49

您无法从移动设备使用集成 Windows 身份验证,因为该设备没有任何登录用户的概念。您还必须确保服务器已打开远程连接。

这里是一个如何让它工作的简单例子

You can't use Integrated Windows Authentication from a mobile device because the device doesn't have any concept of a logged in user. You also have to make sure the server has remote connections turned on.

Here's a simple example of how to get it working.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文