无法打开从掌上电脑到SQL Server 2005的连接(的Windows Mobile 6) [英] Can't open a connection to SQL Server 2005 from a pocketpc (windows mobile 6)

查看:129
本文介绍了无法打开从掌上电脑到SQL Server 2005的连接(的Windows Mobile 6)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从Pocket PC的应用程序(的Windows Mobile 6)到SQL Server 2005的连接,但无论我怎样努力没有奏效。我检查了每一个可能的配置启用TCP SQL Server上,我测试了许多连接字符串,但仍然有问题,当我试图打开的连接,我敢肯定,这不是网络的问题,因为我可以ping从我的掌上电脑没有任何问题,并在防火墙上我的服务器计算机服务器计算机被禁用:这里是连接字符串我用的一个:

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

其中, POS 是我的数据库的名称

where pos is the name of my database

感谢您的帮助

推荐答案

好了,你不能同时拥有的受信任的连接的,并在指定的明确的用户名和密码的同一时间 - 这是一方或

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

您使用受信任的连接,如连接到你的服务器您的Windows凭据 - 那么你的连接字符串看起来是这样的:

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

查看 ConnectionStrings.com 的有效连接字符串的样本为SQL Server的负载

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

这篇关于无法打开从掌上电脑到SQL Server 2005的连接(的Windows Mobile 6)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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