简体   繁体   English

从 windows 移动 6 连接到 SQL Server 2005

[英]connection to SQL Server 2005 from windows mobile 6

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.我正在尝试从袖珍电脑应用程序(windows mobile 6)连接到 SQL Server 2005,但无论我怎么努力都没有成功。 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:我检查了在 SQL 服务器上启用 tcp 的所有可能配置,我测试了许多连接字符串,但是当我尝试打开连接时仍然有问题,我确定这不是网络问题,因为我可以从服务器机器没有任何问题,并且我的服务器机器上的防火墙被禁用:这是我使用的连接字符串之一:

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

where pos is the name of my database其中 pos 是我的数据库的名称

I keep getting a SqlException with class 14 and number 18452, and I can't figure this out我不断收到带有 class 14 和编号 18452 的 SqlException,但我无法弄清楚

Thank you for your help谢谢您的帮助

It looks like you're trying to use Integrated Windows Authentication while at the same time specifying the Windows credentials to use.看起来您正在尝试使用集成 Windows 身份验证,同时指定要使用的 Windows 凭据。 This is not how IWA works.这不是 IWA 的工作方式。 IWA uses the currently logged in user's credentials. IWA 使用当前登录的用户凭据。 In your connection string, specifying the user ID and password doesn't achieve anything.在您的连接字符串中,指定用户 ID 和密码不会产生任何效果。

If you were to remove如果你要删除

Trusted_Connection=yes;

then you would be using SQL Server Authentication, but you'd have to ensure that a user exists in SQL Server with the correct credentials.那么您将使用 SQL 服务器身份验证,但您必须确保 SQL 服务器中存在具有正确凭据的用户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM