<%@ Language=VBScript %> <% Option Explicit %> <% Dim StartTime, EndTime StartTime = Timer Dim objCN ' ADO Connection object Dim objRS ' ADO Recordset object Dim strsql ' SQL query string Dim strTemp ' a temporary string ' Create a connection object Set objCN = Server.CreateObject("ADODB.Connection") ' Connect to the data source objCN.ConnectionString = "DSN=datasource" objCN.Open ' Prepare a SQL query string strsql = "SELECT * FROM tblData" ' Execute the SQL query and set the implicitly created recordset Set objRS = objCN.Execute(strsql) ' Write out the results in a table by concatenating into a string Response.write "" Do While Not objRS.EOF strTemp = strTemp & "" strTemp = strTemp & "" strTemp = strTemp & "" strTemp = strTemp & "" objRS.MoveNext Loop Response.write strTemp Response.write "
" & objRS("field1") & "" & objRS("field2") & "" & objRS("field3") & "" & objRS("field4") & "
" Set objCN = Nothing Set objRS = Nothing EndTime = Timer Response.write "

processing took "&(EndTime-StartTime)&" seconds

 " %>