无法从 PocketPC (Windows Mobile 6) 打开到 SQL Server 2005 的连接
我正在尝试从袖珍电脑应用程序(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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
那么,您不能同时拥有可信连接和指定显式用户名和密码 - 要么是要么。
要么使用可信连接(例如您的 Windows 凭据)连接到服务器 - 那么您的连接字符串如下所示:
或或者,您使用显式用户名和密码- 但在这种情况下,您不能同时使用可信连接/集成安全!
在这种情况下,您的连接字符串将类似于:
查看 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:
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:
Check out the ConnectionStrings.com for loads of samples of valid connection strings for SQL Server
您无法从移动设备使用集成 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.