ashish
ashish

Reputation: 543

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;Command Properties='Command Time Out=45'"

what will be the connection string in windows authentication??

Upvotes: 3

Views: 15104

Answers (3)

Ejaz Ahmed
Ejaz Ahmed

Reputation: 688

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.

Upvotes: 0

Chris McCall
Chris McCall

Reputation: 10397

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

Upvotes: 0

Zephyr
Zephyr

Reputation: 7823

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

Upvotes: 1

Related Questions