Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record pointers on empty cursors/tables
Message
From
02/02/2004 09:27:14
 
 
To
02/02/2004 09:22:42
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00872917
Message ID:
00872919
Views:
17
Hi Jay

This modification should do the trick:
cAlias = ALIAS()

nRecNo = RECNO()

Do Something

SELE (cAlias)

IF nRecNO>0
   GOTO nRecNo
ENDIF
>I use the following code in numerous methods to keep record pointers where they belong
>
>
>cAlias = ALIAS()
>
>nRecNo = RECNO()
>
>
>Do Something
>
>
>SELE (cAlias)
>
>GOTO nRecNo
>
>
>But if the ALIAS was empty then the GOTO will give a record out of range error. Often the Do Something code is using tables/cursors, etc and the goal is to leave open data the same when exiting a method as it was on entering. Any thoughts? Thanks!
>
>Regards, Renoir
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform