<%@ Language=VBScript %> <% Option Explicit %> <% Dim StartTime, EndTime StartTime = Timer Dim objCN ' ADO Connection object Dim objRS ' ADO Recordset object Dim strsql ' SQL query 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 directly without using concatenation operator Response.write "" Do While Not objRS.EOF Response.write "" objRS.MoveNext Loop Response.write "
" Response.write objRS("field1") Response.write "" Response.write objRS("field2") Response.write "" Response.write objRS("field3") Response.write "" Response.write objRS("field4") Response.write "
" objRS.Close objCN.Close Set objCN = Nothing Set objRS = Nothing EndTime = Timer Response.write "

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

 " %>