473,387 Members | 1,481 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Problem building <form> from recordset

Hi,

I have a database of quotes on my website that uses an Access 97
database (I'm cheap...I have an old copy of MS Office). I have one page
that builds a form <select> from a SQL statement that looks like this:
SELECT DISTINCT last, first FROM quotes ORDER BY last, first;

The results are 1,250 records from a 3,700 record table.

I loop through the records, using each to build an <option> for the
<select>. When loading the page, it gets to the <select> and then it's
like someone issued a response.end, because it just dies after about 3
seconds. and I get an incomplete page; looking in view source it is
literally truncated right before the form <select>.

Of course it works at home, but not on my "production" site.

I've tried all kinds of things like executing a stored Access query as
adCmdStoredProc, but it didn't help. I'm not even sure if that method
was even any faster when I ran it at home.

Is there anything else that you folks know of that I could try, or am I
just going to have to bite the bullet and come up with an alternative
way to let my users select the source of the quote?

I'm using ADO, Microsoft.Jet.OLEDB.4.0, response.buffer=true.

I'd appreciate any help you could give me.

Thanks.
--
Wayfarer
Journeys: http://wayfarer.brinkster.net/contact.asp
Jul 19 '05 #1
1 1368
1. Make sure you have an index on both fields last and first. This will
speed the query up.

2. Do not use any string concatenation in the loop. This will be slow!!!!
with over 1000 items.

3. Try this:

If Not rs.EOF Then
With Response
.Write "<SELECT ID='QUOTE' NAME='QUOTE'>"
.Write VbCrLf
Do While Not rs.EOF
dtmItem = rs("last") & ", " & rs("first")
.Write "<OPTION VALUE='"
.Write dtmItem
.Write "'"
if cstr(Request("QUOTE") = cstr(dtmItem) then
.Write " SELECTED"
end if
.Write ">"
.Write dtmItem
.Write "</OPTION>"
.Write VbCrLf
rs.MoveNext
Loop
.Write "</SELECT>"
.Write VbCrLf
End With
End If
-dlbjr

Discerning resolutions for the alms
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Keiron Waites | last post by:
I have the following code: <input type="text" name="search" class="search_top"> <a href="" onclick="window.location='search.inc.php'+document..search. value; return false;"...
3
by: Ben | last post by:
Here's my form: <form name="aForm" method='post'> <input type=file name=file1 onkeypress='KeyPress()'><br> <a id='attachMoreLink' href='javascript:AddFileInput()">Attach More Files </a> <input...
4
by: Howard Jess | last post by:
In Opera 8.01 (Linux; Build 1204) and in Opera 7.54 (Windows XP; Build 3865), my form disappears from the HTML markup (below). To summarize: 1) In a <script> block in the <head> I create a form...
10
by: Phlip | last post by:
HTMListas: (Apologies for I can't Google for this - too many common words.) I have a <form> tag. It thinks I want a <p> break before and after the form. I don't. (My forms are sneaky and...
6
by: snacktime | last post by:
I've searched and searched and have not found a solution to suppress the margin on form or href tags so that there is no space before or after the tag. The only way I have found to do this is to...
4
by: rob c | last post by:
This is a minor thing and only appears in IE (so far), but I'd like to know to correct it (if possible). Whenever I use a form on a webpage, Explorer always leaves a blank line following the...
3
by: Nebulus | last post by:
I'm having a really hard time with IE's innerHTML property and <form> tags. If I use this code: myDiv.innerHTML = "<form>This is a test</form>" in fireFox, the div tag shows the content....
10
by: neverquit | last post by:
hi , Iam Nagesh,Begineer in using Ajax,well i have been using ajax in application, i have faced a problem while placing the responseTEXT into the <div> tag positioned inside the <form> tag iam...
1
by: Pesho318i | last post by:
hi all I have a jsp-based website. The initial layout of the page is correctly displayed both in FF and IE7. However, when I refresh only a part of the page (e.g. a single jsp, using AJAX), the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.