Connection string in (Windows Authentication Mode) vb6

I use this connection string to authenticate the server,

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'"

What will be the connection string in windows authentication?

+3
source share
3 answers

Set Integrated Security = True

Here is the complete line:

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'"
+1
source
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'"
0
source

Excel . , .

, Integrated Security SSPI

, , :

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

, .

0

Source: https://habr.com/ru/post/1767869/


All Articles