473,387 Members | 1,486 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.

Help with recordset EOF option

5
Hi everyone,

I am using ADOR.recordsets in my VB6 program. I want to cycle though the recordset using a DO UNTIL loop (can't use a for, because I am moving the cursor of the recordset an unspecified amount of times inside the loop).

This is the code I am using: (labels is my recordset)

labels.movenext
Do Until labels.EOF
varid = labels.Fields(0).value
Print #3, "value Label" & varid & "n"
Do Until labels.EOF Or labels.Fields(0).value <> varid
Print #3, labels.Fields(1).value
labels.MoveNext
Loop
Print #3, ";"
Loop

The problem comes when the value of labels.EOF equals TRUE the loop still just keeps on going into an endless loop. I put a watch on labels.EOF and the value does become TRUE, but still the loop does not stop.

Hopefully you get the idea.

Any help would be appreciated!
Jun 5 '07 #1
1 4414
Hello PdBeer

It looks to me like it would be worth trying to move the labels.MoveNext command down to in front of the second Loop instruction. That is the loop it refers to?

Hi everyone,

I am using ADOR.recordsets in my VB6 program. I want to cycle though the recordset using a DO UNTIL loop (can't use a for, because I am moving the cursor of the recordset an unspecified amount of times inside the loop).

This is the code I am using: (labels is my recordset)

labels.movenext
Do Until labels.EOF
varid = labels.Fields(0).value
Print #3, "value Label" & varid & "n"
Do Until labels.EOF Or labels.Fields(0).value <> varid
Print #3, labels.Fields(1).value
labels.MoveNext
Loop
Print #3, ";"
Loop

The problem comes when the value of labels.EOF equals TRUE the loop still just keeps on going into an endless loop. I put a watch on labels.EOF and the value does become TRUE, but still the loop does not stop.

Hopefully you get the idea.

Any help would be appreciated!
Jun 6 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

46
by: Kingdom | last post by:
In my data base I have a list of componet types e.g. type A - I have 8 off - type B I have 12 off etc. I'm using Set objRS = objDC.Execute("Select DISTINCT Component_Type FROM Parts_Table") ...
7
by: Munzilla | last post by:
Ok, I have an ASP page that I use to add several pieces of information to a database and also display that information in an edit mode. The problem is, when I use the page for edit, not all of the...
4
by: Skully Matjas | last post by:
I am using the following code (created by the wizard) to allow to bring my form to a particular entery. But when I edit the entery (ex: put new information into a blank cell), it puts that record...
9
by: hope | last post by:
Hi Access 97 I'm lost on this code please can you help ================================= Below is some simple code that will concatenate a single field's value from multiple records into a...
9
by: isaac2004 | last post by:
hi i have a page that inclued a SQL statement that takes a user input from a form and displays the request from the database. every time i try to open the page i get an error message that says Data...
1
by: terryspanky | last post by:
----------------------Below are all the codes don't have errors---- The only problem I have is when I Delete, I'ts not deleting the subject that I click. I want to use the above codes to modify the...
5
by: liv | last post by:
<%@LANGUAGE="VBSCRIPT" %> <% dim id_utilizator, conn, rs id_utilizator = Session("id_utilizator") if id_utilizator ="" then Response.Redirect("logare_ut.asp") end if set...
7
by: jrb22250 | last post by:
I have the Dual Drop down in same page, my problem is the second drop down I can not figure out how to right an ORDER BY EPN asc or desc in there <html> <head> <meta name="GENERATOR"...
0
ADezii
by: ADezii | last post by:
When you create an ADO Recordset, you should have some idea as to what functionality the Recordset does/does not provide. Some critical questions may, and should, be: Can I add New Records to the...
2
by: hotflash | last post by:
Hi Master CroCrew, I found a good PURE ASP that will allow you to upload 10MB file to the server and the file contents such as Network, Author, Title, etc... will insert to MS Access at the same...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.