Click to See Complete Forum and Search --> : SQL Server connection


Xelion
January 24th, 2000, 12:06 AM
How may I open ADO connection to SQL Server using Windows NT authentication?
Thanks in advance...

nilch
January 24th, 2000, 01:32 AM
ServerName = "Servername"
UserName = "username"
db_conn.Provider = "sqloledb"
db_conn.Properties("Data Source").Value = ServerName
db_conn.Properties("Initial Catalog").Value = "databasename"
db_conn.Properties("User ID").Value = UserName
db_conn.Open

where db_conn is the ADO database connection established
U hv to define db_conn as new adodb.connection at module level.

This is one way of establishing a connection with SQL Server.
Or else define a DSN entry on your connection and point to the SQL Server using Windows NT authentication.