在VB6中使用Windows身份验证模式的连接字符串

3

我正在使用这个连接字符串进行服务器认证,

Dim rs As New ADODB.Recordset



strConnectionString = "Provider=SQLOLEDB.1;Persyst Security Info=False;User Id=fileade;Password=fileade;Initial Catalog=Fileade;Data Source=10.237.225.170;Command Properties='Command Time Out=45'"

在Windows身份验证中,连接字符串将是什么?

1
"Persyst Security Info" 是应该是 "Persist Security Info" 吗? - onedaywhen
3个回答

1

设置集成安全性=True

以下是完整的字符串:

Provider=SQLOLEDB.1;Integrated Security=True;Initial Catalog=Fileade;Data Source=10.237.225.170;Persyst Security Info=False;Command Properties='Command Time Out=45'"

0

我通常使用Excel为我创建连接字符串。只需尝试使用所需选项连接到您的服务器,数据连接属性将具有连接字符串。

我认为您需要将集成安全性设置为SSPI

这是一个对我有效的字符串,我已经根据您的情况进行了修改:

strConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Initial Catalog=Fileade;Data Source=10.237.225.170"

希望这有所帮助。

0
strConnectionString = "Provider=SQLOLEDB.1;Persyst Security Info=False;User Id=fileade;Password=fileade;Integrated Security=true;Initial Catalog=Fileade;Data Source=10.237.225.170;Command Properties='Command Time Out=45'"

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接