Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving next record
Message
From
02/05/2002 15:17:52
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Moving next record
Miscellaneous
Thread ID:
00652072
Message ID:
00652072
Views:
67
i am trying to write a statment like this for searching through a table.

select a_alias
set order to tagname
DO while not EOF()
locate for field1 = variable and field2 = variable2
nrecno = recno()
If found()
do some stuff
Endif
nrecno = nrecno + 1
go nrecno in a_alias
loop

the problem i am having is that it the program is not going to the next record. when i debug the code, it shows that the recno is increased by one; but when it loops back to the nrecno = recno(), it shows the recno() as being the original recno(). This hangs me up in a loop and i have to kill the program through task manager. does anyone know why it is not moving to the next record in the table? is there a better command than trying to increase the record number manually? please help. thanks.
Next
Reply
Map
View

Click here to load this message in the networking platform