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.
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.