Speeding Up Recordset Loop

I've got this code that loops through a recordset and prints the whole thing out in an html table. Sometimes it takes 30 seconds to a minute to display a little over 2000 records (like 25 columns). My boss feels that it needs to be faster even though another internal reporting system that works similarly takes far longer than mine.
I've ruled out the database execution. I have code that prints out after it finishes going to the database. It shows up almost immediately.
I set up a javascript timer that says the entire execution, including the database, is taking around 1.5 seconds every time.e.

View Replies


ADVERTISEMENT

Recordset Controlled By Another Recordset Within A Loop

I have created a forum, in which I have 3 tables:

1: Table_Forum
2: Threads
3: Replies

I have it at the moment that on the main default.asp there is a recordset that will
display all records within that table, these are a list of forums that will be available.

I have a table that will show the forum name, and the description. This table is then looped using Do while not, now what i need to do is show how many records in the Treads table are related to each forum using asp. Code:

View Replies View Related

Loop Through Recordset

Is it possible to loop through recordsets using javascript? If possible, can show me an example.

View Replies View Related

Recordset Loop

Given a page with 12 thumbnails numbered one through 12 I am trying to figure out how I can let a user click on any of the twelve thumbnails and be taken to page that has a forward and backward arrow so they can go through the other images in order.

So if someone clicks on the 7th image the next page shows that image enlarged with a foward arrow taking them to image 8 or a reverse arrow taking them to image 6. When the controls get to image 1 (or image 12) the navigation adjusts to just keep going through the images.

View Replies View Related

Loop Through Recordset

I have a recordset and an array which i get from a form submission. I want to loop through all recordsets and compare one by one with the values I get from the array. Is it possible to give me the general construction because I am stuck?

View Replies View Related

For Loop Through Recordset

I currently use Do while loop, but I'd rather use a For Loop though I have never gotten the hang of them. Would some one please be so kind as to show me how to loop through a
recordset.

View Replies View Related

Recordset Inside A Loop

Is it common practice to create a recordset object inside of a loop? Does it create multiple connections to the database?

View Replies View Related

Loop Through A Recordset And Send Emails

I need to send an .ASP page as an email template using VBScript. I'd like to do so using CDONTS or CDOSYS. the script needs to loop through a recordset and send emails using data from SQL 2000.

when i try to send using a script i built the asp page pulls in without rendering the asp. how can i pull the rendered asp into my vb for emailing?

View Replies View Related

Create Recordset, Loop, Update Second Table

I am in the process of rewriting my table formats for an Access Project that was created. I now need to get the data from 1 table and transfer to a second table.

I created a page that creates the record set, I then loop through that record set and need to run an update statement to a second table, however, I get the following message:

Microsoft JET Database Engine (0x80004005)
Could not use ''; file already in use.
/BusPlanTest/updBusPlan.asp, line 17

Below is the code I am using: Code:

View Replies View Related

Speeding Up

I am trying to put limits on my SQL satatements in my ASP pages to speed up the page however when I use a statement:

select * from Table Limit 1

or

select * from Table Limit 0, 1

in my sql statements it comes up Incorrect Santax?

View Replies View Related

Speeding Up A Page

I have a query that returns a resultset rather fast, but when I go through the loop to write it out to the page I get a slow display. Is there a way to speed this up?

View Replies View Related

Parameter Not Passed From For Loop To While Loop

I'm trying to pass a parameter from a for loop to the nested while loop
but only the first counter is passed. Here is the code:

View Replies View Related

Nesting One Loop Within Another, Using 1st Loop As Criteria For 2nd

I have a recordset that I loop through all of the data within a table, within the same loop, I am trying to add another loops that pulls information from the first recordset to base the second recordset off of: Code:

View Replies View Related

Error Type: ADODB.Recordset (0x800A0BADODB.Recordset (0x800A0BCD)

Last week, my shopping cart was still working well until I began getting the following errors 2days ago..

Error Type:

ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
../order/saveorder.asp, line 157

Browser Type:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)

Page:
GET /main/saveorder.asp

Could you check my code below and let me know what possibly the error is?

View Replies View Related

Do While Loop?

I have a case statment like

select case code
case "01"
ups_desc = "OPTION1."
case "02"
ups_desc = "OPTION2."
case "03"
ups_desc = "OPTION3"
case "07"
ups_desc = "OPTION4"
case "08"
ups_desc = "OPTION5 "
case "11"
ups_desc = "OPTION6"
case "12"
ups_desc = "OPTION7"
end select


I then have table called "users" which has the following
id
UserID
Code

now the trick

I want to loop through the recordset of the user tables and populate a drop down where the code from the case and the user table are the same.

Something like

do while rs("code") = code
<option> This then is populated based upon the loop(I have this code)</option>
loop

View Replies View Related

Do While Loop

I need to insert recordes into a db based upon a number returned in a form
Somerthing like

AddRecords = Request.Form("NumberOfRecords")

Count = 0

if Count < AddRecords Then
Do while Count.eof

SQL Code....

Count = Count + 1

Count.move next
Loop
End If

View Replies View Related

How To Loop

i have 2 tables (A & B) with date records
now i loop table A and then table B, the output will be table A in the front
and table B in the back.how can i make the output show by date in both tables altogether?
do i need to combine tables before but the number of records is over 100K
which may spend a lot of processing power?

View Replies View Related

Asp Loop

on my classifieds site i would like to create a simple ads system. i currently have the ads site made but need some advice.

on my classifieds site i would like to display the ads down the left hand side.

however i dont want to over display ads.

if there is not many items listed i only want a small amount of adverts shown on the left hand side. however if there is lots listed
i would like quite a few adverts listed.

otherwise i would have a big list of adverts and only a small number of items listed making a big blank space on my page.

i am guessing this would have to be a loop or something.

the code i am using to show the text links is <%=adurl%>

View Replies View Related

For Loop

I am using a for loop in one of my asp page. Could someone let me know if I can do the for loop as follow:

[code]<% for i = 1 to 5 %>
my html code
my html code
my html code
<% Next i %>
instead of
[code]<%
for i = 1 to 5
Response.Write "<input name = 'id'"&i&" type='text' value = "&id& ">"
Next i
%>

View Replies View Related

More Than 1 Do Loop

I am using ASP and need a DO LOOP to get some info back from the db. but the asp reads the first do loop but does not read the second one ......

View Replies View Related

While Loop

is there any function or statements that work the same as the 'break' statement in C++ language?

for example:

While Not rs.EOF
If rs("LoginID") = userId Then
break 'what shd i use for ASP???

Else
rs.movenext

View Replies View Related

Loop Within A Loop

im writing some script to add records to my db. but if a value thats about to be added exists, then dont add that record.for example: if i want to add 7 records to my db with the values 1 - 7, but the db already has 3, 5 and 7, then it should only add 4 new records (1, 2, 4 and 6).

i have a record returning all records form my db, and an array with the values i want to add. i want to loop through my recordset of all existing entries, then for each loop, start another loop to see if the value exists, and if it doesnt , then add a new record.

View Replies View Related

For Loop Or Do While Loop

How to use the for loop or do while loop to create the age range from 10 -100 to let the user to select from the form object - list/menu by using asp? The coding below is just a concept. For example

Response.Write("<select name=""select"">")

for (a=0; a<101; a++)
(
Response.Write("<option value=""" & age & """>" & age & "</option>")
)

Response.Write("</select>")

View Replies View Related

If Then Else Loop

I'm trying to create a page where images are displayed based on an id in a sql table (basically its an unlit candle until a value in the id field exists). I'm not getting an error with my code below - but its not working right either. Code:

<% If rs("my_id")="2" Then Response.Write "<img src=""images/07.jpg"" width=""56"" height=""97"" alt="lit candle">"Else Response.Write "<img src=""images/UNLIT_07.jpg"" width=""56"" height=""97"" alt=""unlit candle"">" End If %> ...

View Replies View Related

Sub And For Next Loop

I have a SUB which has input variables. If I run it once its okay, but I need to include it in a for....next loop. Can this be done ?

for i=0 to 100
call mySub(arr(0,i))
next

sub mySub(var)
.....code
end sub

View Replies View Related

RS Loop

I am getting this error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver]Numeric value out of range
(null)
/database/data_entry.asp, line 90

Line 90 is shown below...

// count the total records by iterating through the recordset
for (rsProducts_total=0; !rsProducts.EOF; rsProducts.MoveNext())
{ <---- Line 90
rsProducts_total++;
}

This is an access database, connected to via a DSN. Any help will be muchly appreciated! I'm stuck on this one.

View Replies View Related

For Next Loop

I'm using three loops on a page and would like to set the loops individually to start at either 0 or -1 based on a condition. As an example, I would want the loop to start at either -1 as shown or 0.

Dim r
For r = --1 to Session("TotalRowsF")

code...

Next

Or, based on the condition it could be

Dim r
For r = 0 to Session("TotalRowsF")

code...

Next

View Replies View Related

ASP Loop

I can display some text 5 times using a loop and i want to pass those printed
values to another page when i clicked send button.

View Replies View Related

Loop D Loop

I'm trying to give the variable sStart a new name on each loo

EG
sStart1 = value1
sStart2 = value

however the following piece of code doesn't work

set oNodes=xml.selectNodes("/Project/Tasks/Task/Start"
for each oNode in oNode
sStart=oNode.tex
response.write("<BR>"
for i=0 to 10
response.Write(sStart(i)
nex
next

View Replies View Related

Next Or Loop?

I've been coding now for around 3 years. A year ago, I inherited a forum from a friend who didn't have the time to run it anymore. It's an old, very old, version of the WebWiz template, much modified. So modified in fact that upgrading to a newer version is impracticle, the best I can do is add features that you'd expect a forum to have these days. Code:

View Replies View Related

Do While Loop / ASP

Here's my problem (aside from the fact that I'm a newbie.) I'm using ASP to call an Access database with four separate tables. The first three are working perfectly. The fourth is a little more tricky. I'm pulling the information based on a registration number (entered via a form). In the fourth table, each registration number is listed multiple times with production information for each year and quarter. For example:

(reg number, year, quarter, # lbs, amount)
A008374 - 2001 - Q1 - 840 - 232
A008374 - 2001 - Q2 - 520 - 164
A008374 - 2001 - Q3 - 8256 - 3368
.
.
.
etc.

I want to use a Do While...Loop (print the information while the registration # is equal to the one entered) to print out the information for each entry. Code:

View Replies View Related

Loop-de-loop

what's causing the error "loop without do"? whenever i put a do in it keeps coming up with more errors. Code:

<table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#E8E8E8">
<tr>
<%Do Until RS1.EOF%>
<td align="center" width="25%"><font face="Trebuchet MS" size=2 color=<%IF RS1("Status") = "Booked" THEN%>FF0000<%ELSE%><%END IF%>><%IF
RS1("B.Room") = "Booked" THEN%><a href=blah><%=RS1("B.Room")%></a></td>
<%RS1.MoveNext%>
<%
loop
%>
</tr>
</table>.

View Replies View Related

For Each Loop

I have a form with a select object ("Select") that will allow me to select multiple values. I put the following code in my asp file to display the values:

for each Item in request.form("Select")
vValue = request.form("Select(Item)")
response.write(vValue & "<br />")
next

The above code produces only multiple blank lines for the selections.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved