connection string in (windows authentication mode) vb6
i am using this connection string for server authentication ,
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;Comm开发者_开发技巧and Properties='Command Time Out=45'"
what will be the connection string in windows authentication??
Set Integrated Security=True
Here is the complete string:
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'"
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'"
I usually use Excel to create the connection string for me. Just try to connect to your server with the options you need, and the data connection property will have the connection string.
I think you would have to set Integrated Security to SSPI
Here is a string that worked for me that I modified for your situation:
strConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Initial Catalog=Fileade;Data Source=10.237.225.170"
Hope that helps.
精彩评论