- From Two Different Loops

i have 2 loops that give me 2 sets of 25 numbers. code:

do while not rs.eof
value = rs("value1")
rs.movenext
loop

do while not rs.eof
value = rs("value2")
rs.movenext
loop

i need to subtract value 1 from value 2 for each value in the loop?

View Replies


ADVERTISEMENT

Loops

Attached is the code that I am trying to put together. Does anyone know how to loop (see bold text below) this so it will display all the data from the columns in this row? Code:

View Replies View Related

Loops And URL's

I am not sure how exactly to put this, but what I need to do is the following: taking into account that there are multiple URL's pointing to the same server

If url=blah.com do nothing
if url=blah-blah.com *break out of frameset.


Now I remember there being an easy way to do this but can't for the life of me remember where to find it?

View Replies View Related

For Each In Loops

I was hoping someone would be able to explain the "For Each In Loop" set up.

What I'm really asking is when it can be used and how it is set up.

For example:

If I had something like...

Quote: For Each X in objSomeObject
Response.Write X & "<br /">
Next 'X

How do I know I can use the For Each In Loop and what must I do to be able to use the X portion of it?

Sorry if this is a very general question but I want to understand how one can recognise when it is possible to use this structure and when it's not.

More background to this is that I'm going to attempt to use this structure on a listbox in .NET and possible ASP and I want to ensure that I loop through each and every item.

View Replies View Related

Nested Loops

What I'm trying to do is match all buyer requirements in a database table to all available properties in another table. I then want all these matches displayed in a report with the buyer name followed by the relevant matching properties, this should occur until all buyers have been displayed with their matching properties.

The problem is that it only works correctly for the first buyer for which the correct properties are displayed, after that all I get is the buyer names without their matching properties... so it seems to loop perfectly the first time but from then on forgets about the inner loop! Code:

View Replies View Related

While Loops And Dates

I want to find the next event in my sql database. To do this, I have a query in a while loop. I set a new DateTime variable to the current date and run the query, it checks to see if it found a suitable event, if not, I want to increase the day by one and loop again.

View Replies View Related

Arrays And Loops

What I have is a recordset listing out a group of names. I've retrieved the field that lists the id numbers for the array and split them to a list. Then I want it to loop through the names listing trying to highlight the ids that need to be hightlighted.

What I am getting is my list repeats the names according to how many ids are in the array. So if I have 2 numbers in the array I see every name on the list twice and the two that I need selected.

I want the list to show the names one time with the correct names selected. What is wrong with this code? Code:

View Replies View Related

Loops And Arrays

I have two 2-dimensional arrays (made by using GetRows()) What I need to do is:

Loop
If Arr1(0) = Arr2(0) then
do an update....
End if
End Loop

Basically I need to compare each value in Arr1(0) to the values in Arr2(0) - if I get a match, I have to do an update in the database. What is the easiest way to do this .

View Replies View Related

Type Of Loops

there are various of loops but i am analyzing to use which one. maybe i could get some opinions from u all. there are

while wend, for loop, do loop

my situation is if i need 2 execute on a daily basis data on the particular month and will stop on the last day of the month.. without interseeing to the next month

can anyone might help me by suggesting on the suitable loop 2 use for this problem?

View Replies View Related

Problem With Deep Inner Loops

I have some difficulty with deep inner loop. What I want is Eg

Product Category: Air-Cond

Company: ABC
Address: 121, Time City, Malaysia.

Company: XYZ
Address: 1, City, Malaysia.

Product Category: Fridge

Company: MAS
Address: 2, Old Building, Singapore.

Company: SAM
Address: 11 Kiosk, Malaysia.

Basically, the first the first loop is to get all product category and one by one insert into the second inner loop. But, I need another inner loop under the second one, which is to categorized by country. Code:

View Replies View Related

Paging 2 Recordset Loops At The Same Time??

I have successfully paged through a recordset on my page using the .recordCount, etc. methods, the only thing is I have 2 independent recordsets looping on the page, which when there was not paging involved this worked fine, however now I need to span the results of BOTH of these across pages, I just cannot seem to figure out how!

I have one set of records paging fine, but the other either messes the page up, or shows on the first page of results and no more of the other recordset, etc.... so yeah that is basically the problem I am hitting, so I was just wondering is there any examples or ways you could tell me to do this??

View Replies View Related







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