There are a couple of ways to connect. Here is one example:
<%
set cn_connection = Server.CreateObject("ADODB.Connection")
cn_connection.ConnectionTimeout = 120
cn_connection.Mode = 3
cn_connection.open "Driver={SQL Server};" & _
"Server=Server IP or Hostname;" & _
"Database=SECTS;" & _
"Trusted_Connection=yes"
%>
As far as selecting all records, the below example will work:
sql = "SELECT * FROM members"
Set rs_getType = cn_Connection.Execute(sql)
while not rs_getEvent.EOF
variable = rs_getEvent("fldname")
variable2 = rs_getEvent("fldname2")
rs_getEvent.movenext
wend