经典 ASP - 使用 Windows 身份验证的 SQL Server 2008 连接字符串 [英] Classic ASP - SQL Server 2008 Connection String using Windows Authentication

查看:37
本文介绍了经典 ASP - 使用 Windows 身份验证的 SQL Server 2008 连接字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这应该非常简单,但我无法为使用 Windows 身份验证的 SQL Server 2008 的本地副本提供有效的连接字符串.我尝试使用数据链接属性工具创建连接字符串,并且连接没有问题,但是当我将生成的字符串复制粘贴到我的 ADODB.Connection 对象的 ConnectionString 属性中时,我得到了各种有趣和不同的错误.

This should be painfully simple, but I cannot come up with a working connection string for a local copy of SQL Server 2008 using Windows Authentication. I've tried using the Data Link Properties tool to create a connection string and it has no problems connecting, but when I copy paste the generated string into my ADODB.Connection object's ConnectionString property I get all sorts of fun and different errors.

Set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "SQLNCLI10.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=climb4acure;Data Source=(local);"

Microsoft OLE DB 服务组件 (0x80040E21)多步 OLE DB 操作产生错误.检查每个 OLE DB 状态值(如果可用).没有完成任何工作.

我尝试了多种类似的连接字符串,但我找不到可以与 Windows 身份验证一起使用的连接字符串.有人能指出我正确的方向吗?

I've tried a variety of similar connection strings but I cannot find one that will work with Windows Authentication. Can someone point me in the right direction?

谢谢!

推荐答案

我假设你安装了 2008 Native Client?另外,我注意到您在开头缺少提供者"标签 - 您对这个有更多的运气吗:

I assume you have the 2008 Native Client installed? Also, I noticed that you're missing the "provider" tag at the beginning - do you have any more luck with this one:

Provider=SQLNCLI10.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=climb4acure;Data Source=(local);

这篇关于经典 ASP - 使用 Windows 身份验证的 SQL Server 2008 连接字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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