hi i'm wondering how i can speed up my code, make it more efficient, thanks:
Code:
<%
Set connDB = Server.CreateObject("ADODB.Connection")
connDB.Open "DBQ=" & Server.MapPath("\db\db.mdb") & ";" & _
"DRIVER=Microsoft Access Driver (*.mdb)"
sql = "SELECT * FROM logbook WHERE cusine IN ('CHINESE') AND eat IN ('BOTH','DINE IN') ORDER BY rname ASC"
Set rs = connDB.Execute(sql)
While Not rs.EOF
Ername=rs("rname")
Eeat=rs("eat")
Eaddress1=rs("address1")
Eaddress2=rs("address2")
Ehours=rs("hours")
Especial=rs("special")
Ephone=rs("phone")
Eadditional1=rs("additional1")
Eadditional2=rs("additional2")
Emenu=rs("menu")
Edining=rs("dining")
Ehours2=rs("hours2")
Emenu2=rs("menu2")
Ephone2=rs("phone2")
collect1 =collect1 & Ername&","
collect2 =collect2 & Eeat&","
collect3 =collect3 & Eaddress1&","
collect4 =collect4 & Eaddress2&","
collect5 =collect5 & Ehours&","
collect6 =collect6 & Especial&","
collect7 =collect7 & Ephone&","
collect8 =collect8 & Eadditional1&","
collect9 =collect9 & Eadditional2&","
collect10 =collect10 & Emenu&","
collect11 =collect11 & Edining&","
collect12 =collect12 & Ehours2&","
collect13 =collect13 & Emenu2&","
collect14 =collect14 & Ephone2&","
rs.MoveNext
Wend
If rs.EOF AND (Ername = "") Then
collect1 = "None listed. Please try again."
End If
output1="&output1="& collect1
Response.Write output1
Response.Write ""
output2="&output2="& collect2
Response.Write output2
Response.Write ""
output3="&output3="& collect3
Response.Write output3
Response.Write ""
output4="&output4="& collect4
Response.Write output4
Response.Write ""
output5="&output5="& collect5
Response.Write output5
Response.Write ""
output6="&output6="& collect6
Response.Write output6
Response.Write ""
output7="&output7="& collect7
Response.Write output7
Response.Write ""
output8="&output8="& collect8
Response.Write output8
Response.Write ""
output9="&output9="& collect9
Response.Write output9
Response.Write ""
output10="&output10="& collect10
Response.Write output10
Response.Write ""
output11="&output11="& collect11
Response.Write output11
Response.Write ""
output12="&output12="& collect12
Response.Write output12
Response.Write ""
output13="&output13="& collect13
Response.Write output13
Response.Write ""
output14="&output14="& collect14
Response.Write output14
Response.Write ""
Counter = 1
Response.Write "&Counter=" & Counter
Set rs = Nothing
Set connDB = Nothing
%>