Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connect to SQL Server 2000 using Windows Authentication

Status
Not open for further replies.

AppSpecialist

Programmer
Jul 6, 2001
64
CA
Does anyone have a piece of VB Script that demonstrates how to connect to SQL Server using VBScript and Windows authentication.

Also does anything specific need to be configured on SQL Server to allow this to work... other than adding the login.

Thanks
 
Right. I know how to connect useing SQL auth. as seen below. But Windows?


Set cnn = New ADODB.Connection
cnn.ConnectionString = "driver={SQL Server};" & "server=MSSQL_F1;uid=user1;pwd=password;database=database1"
cnn.ConnectionTimeout = 30
cnn.Open Ashley L Rickards
SQL DBA
 
I answered it myself... but for Ashley's help try this...

Set Conn = CreateObject("ADODB.Connection")
Conn.ConnectionString = "Trusted_Connection=yes;Provider=SQLOLEDB.1;Intergrated Security=SSPI;Persist Security Info=TRUE;Initial Catalog=tempdb;Data Source=abcd"
Conn.open
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top