How may I open ADO connection to SQL Server using Windows NT authentication?
Thanks in advance...
Printable View
How may I open ADO connection to SQL Server using Windows NT authentication?
Thanks in advance...
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.