l<%@ Page language="VB"
debug="true" aspcompat="true" %>
l<%
lConst adOpenStatic = 3
lDIM cFields AS String,nStart AS
Double,oConn AS Object,oRS AS Object
lcFields="_ID,Appointment_Notes
FROM Visit_"
lcFields="* FROM
Visit_"
lnStart=TIMER
lResponse.Write("Start
"+CSTR(NOW())+"<br>")
l
loConn=Server.CreateObject("ADODB.Connection")
loConn.Open("DRIVER={SQL
Server};SERVER=(local);DATABASE=test;UID=user;Password=pass;")
loRS=Server.CreateObject("ADODB.Recordset")
loRS.Open("SELECT
"+cFields+" WHERE Appointment_Notes IS NOT NULL",oConn,adOpenStatic)
l
lResponse.Write("Done
"+CSTR(TIMER-nStart)+"
"+CSTR(oRS.RecordCount)+"<br>")
l
l'must close explicitly or subsequent
page access will be slow (because of delayed
l'garbage collection??)
loRS.Close
loConn.Close
l%>
l
lOn 850 MHz PIII: First cFields list
gives .25, second gives .70 seconds