Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IF USED()=.F. OPEN else SELECT the Table (Foxpro 2.5b)
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
IF USED()=.F. OPEN else SELECT the Table (Foxpro 2.5b)
Miscellaneous
Thread ID:
00341636
Message ID:
00341636
Views:
75
I am using a quite simple and very usefull routine for years that works great if the table is in the same directory as the program but refuse to work if the table is in a different directory.

Well.. I could probably figure it out if I take the time to do it but there are probably many of you that has the routine already made and working perfectly. So why reinvent the weel?

The procedure check the following: if the table is not opened, it opens it and select it. If it is opened it onky select it. The second parameter is to select the order tag.
* FICHIER.PRG (Foxpro 2.5b)
*-----------------------------
PARAMETERS _DBF,ORDRE
IF USED(_DBF)=.F.
   USE (_DBF) IN 0
ENDIF
SELECT (ALIAS(_DBF))
IF PARAMETERS()=2
   SET ORDER TO (ORDRE)
ENDIF
So... how can it also work with tables in different directories than the program.

Thanks in advance.
Réal Philippon
www.ultra.ca
Next
Reply
Map
View

Click here to load this message in the networking platform