This may help you get started.
Code:
Dim Conn, RS, sql
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=SQLOLEDB;Data Source=(local);Database=db_name;UID=user_name;PWD=user_pass"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open sql, Conn, 1, 1
http://www.asp101.com/articles/john/...ng/default.asp
cheers