Hi.
I have an asp page that reads maintenance and other similar issues from an Access2000 db. Some of the data is small such as the name of the caller, room number, telephone, but there is also large amounts of information kept in memo fields, such as an explanation of the problem (sometimes a couple of paragraphs) and what people have done so far to fix it (sometimes has many entries, often large).
As you would expect, it's a bit slow!
I have looked at some articles around the place (such as at 4guys) and these have helped a bit. They suggest stuff like using option explicit and other small things to increase speed.
My question is, how would performance differ between these two code examples? If at all?
1. using response.write
<% while not objRS.eof
response.write "<table>"
response.write "<tr>"
response.write "<td>" & objRS("progress" & "</TD>"
..... {other fields} ....
objRS.movenext
wend %>
2. without response.write
<% while not objRS.eof %>
<table>
<tr>
<td><%=objRS("progress"%></td>
..... {other fields} ....
<% objRS.movenext
wend %>
For all I know, they may perform exactly the same, but maybe there's something I don't know about.
Sorry the codes a bit rude but I'm only showing it as an example of the different ways to program what ends up the same in HTML.
Thanks heaps!
Thedon
I have an asp page that reads maintenance and other similar issues from an Access2000 db. Some of the data is small such as the name of the caller, room number, telephone, but there is also large amounts of information kept in memo fields, such as an explanation of the problem (sometimes a couple of paragraphs) and what people have done so far to fix it (sometimes has many entries, often large).
As you would expect, it's a bit slow!
I have looked at some articles around the place (such as at 4guys) and these have helped a bit. They suggest stuff like using option explicit and other small things to increase speed.
My question is, how would performance differ between these two code examples? If at all?
1. using response.write
<% while not objRS.eof
response.write "<table>"
response.write "<tr>"
response.write "<td>" & objRS("progress" & "</TD>"
..... {other fields} ....
objRS.movenext
wend %>
2. without response.write
<% while not objRS.eof %>
<table>
<tr>
<td><%=objRS("progress"%></td>
..... {other fields} ....
<% objRS.movenext
wend %>
For all I know, they may perform exactly the same, but maybe there's something I don't know about.
Sorry the codes a bit rude but I'm only showing it as an example of the different ways to program what ends up the same in HTML.
Thanks heaps!
Thedon