Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recursive loop and SCAN
Message
From
26/07/2002 22:51:45
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00683191
Message ID:
00683199
Views:
52
>The SCAN/ENDSCAN only restores proper alias. It doesn't restore record pointer. I don't know what you're doing but maybe you can use USE ... AGAIN instead of using the same cursor. This way cursor became "local".

This would be a nice enhancement in the SCAN command.

As for what I am trying to do, here's the Recursive() method:
PARAMETERS tnNumero
LOCAL lnRecno
SCAN FOR NoParent=tnNumero
   ...
   lnRecno=RECNO()
   This.Recursive(Numero)
   GO lnRecno
ENDSCAN
So, as you can see, the method is calling itself. The only way I have succeeded to make it work, is by saving my pointer and restoring it back.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform