dim DSN, Conn, Rs
DSN = "Driver={SQL Server};Server=dbname;UID=id;PWD=password;"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open DSN
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.Open "Select * From [db].dbo.[table] Where 1 = 1", Conn, 3, 1
If Rs.RecordCount > 0 And Not Rs.EOF Then
response.write(Rs(0))
End If
Rs.Close: Set Rs = Nothing
Conn.Close: Set Conn = Nothing