Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BROWSE woes
Message
 
To
07/07/1998 12:00:14
Zaraq Bari
Bari Studios Limited
Lahore, Pakistan
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00114925
Message ID:
00115000
Views:
13
>I have a form with a grid which contains the APPOINTMENTS table.The records which are deleted from the APPOINTMENTS table are saved in the BACKUP table by the command:
>
>SCATTER MEMVAR
>INSERT INTO backup FROM MEMVAR
>PACK
>
>When I issue the command to see the backup table in a BROWSE Window:
>
>USE backup IN 0
>BROWSE NORMAL NOWAIT
>MOVE WINDOW backup CENTER
>
>VFP says file is in use and does not open the BROWSE Window.
>Backup is a free table.How do I open the Browse window with the said Backup table in the APPOINTMENTS form.
>Thank You All
>Zaraq Bari
Zaraq,

Change you code from;

USE backup IN 0
BROWSE NORMAL NOWAIT
MOVE WINDOW backup CENTER

to;
IF USED("Backup")
   SELECT Backup
ELSE
   SELECT 0
   USE Backup AGAIN ALIAS Backup
ENDIF
BROWSE NORMAL NOWAIT
MOVE WINDOW  backup CENTER
You have tow problems in the existing code, 1) you don't account for the possibility that the backup file is already open somewhere and 2) the IN 0 option DOES NOT make that work area current.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform