Why do you want to use Windows Auth on the DB? For a website using the DSN, that username and password will always be the IIS anonymous user. You should set it to SQL Server authentication, then provide the login username and password that has access to the DB on the SQL Server.
A better option is to go DSN-less:
Code:
strConnString = "Provider=SQLOLEDB; Data Source=<servername>; Initial Catalog=<database>; User Id=<username>; Password=<password>"
Set objDataCmd = server.CreateObject("ADODB.Command")
Set objConn = server.CreateObject ("ADODB.connection")
Set objRS = server.CreateObject("ADODB.recordset")
objConn.Open strConnString
objDataCmd.ActiveConnection = objConn
objDataCmd.CommandText = "YOUR SQL HERE"
Set objRS=objDataCmd.Execute ( , ,adCmdText)
'Work the resultset
If NOT objRS.BOF AND NOT objRS.EOF Then
While NOT objRS.EOF
'Read from the recordset
objRS.MoveNext
WEnd
Else
'Recordset was empty
End If
objRS.Close
objConn.Close
Set objRS = Nothing
Set objConn = Nothing
Set objDataCmd = Nothing
<servername> = IP Address or Server Name of the DB Server
<database> = The name of the DB on the DB server you want to bind to
<username> = The username of a login that has access to the DB
<password> = The password for the login
The benefit of going DSN-less, is you don't have to setup a DSN on every web server you have (if this is going to be load-balanced for example). It's also easier to manage in the long run. I usually put the connection construction and destruction in a sub, call it at the start of the page to build the connection, do all of my SQL queries, then destroy the connection at the end of the page. Then stick those subs in an ASP that has just global functions, and include that global functions ASP at the top of all your pages. Now it takes one change to the global functions ASP to change your connection string site-wide.