Here's a very compact example: <%@ LANGUAGE = VBScript %> <% Option Explicit
' Declare your Variables Dim DBConn, rstOne, strSQL1 ' Create your Connection Set DBConn = Server.CreateObject("ADODB.Connection") DBConn.Open "Provider=SQLOLEDB; Data Source=YourDataSource;" & _ "Initial Catalog=DatabaseName;UId=#####;pwd=#####;" ' Create your Recordset Object Set rstOne = Server.CreateObject("ADODB.Recordset") Set rstOne = DBConn.Execute("SELECT FirstName FROM DatabaseName") ' Write your Data to yourpage.asp Response.Write rstOne("FirstName")
%>
I don't think I left anything out, but like I said this is a very compact example. You can build upon this once you analyze it and see what's happening where.