The last post, that I posted not working for you ?
Have you any code before that you are posted, that is working with backupdir + "&myTab" ?
Try something like this:
( combination of my post and that the 'Slighthaze' post )
workingdir = "c:\myApp\"
backupdir = "c:\backup\"
* open backup table and set alias to it
USE backupdir+"&myTab" IN 0 ALIAS "Backup_table"
* this select uses just opened table backupdir+"&myTab" in alias "Backup_table"
* and also you can use cursor instead of table ( ofcourse, if you can ), the difference is only, that cursor is temporary table, and Foxpro automaticaly delete it after it is closed, and also this cursor is readonly ( if READWRITE is not specified - VFP7 )
Select * FROM workingdir+"&myTab" INTO cursor "XYZ" ;
WHERE pkey NOT IN ( SELECT pkey FROM "Backup_table" )
* select backup table, that is opened
SELECT "Backup_table"
* insert records
APPEND FROM DBF( "XYZ" )
* close tables
USE IN "XYZ"
USE IN "Backup_table"
------------------------------------
Slighthaze,
*!* It also probably has the alias of "B"
I don't thing so, because if there is opened
tables that apear in select statement, it uses them
For example:
Have table 'Table1'
USE Table1 IN 0 ALIAS 'Some_other_alias'
* this select do not open Table1 again, it just use table that is opened ( 'Some_other_alias' )
SELECT * FROM Table1
( I am using VFP 7.0, may be this is not working with earlier versions of Foxpro, I don't now it )
Zhavic
---------------------------------------------------------------
In the 1960s you needed the power of two Comodore64s to get a rocket to the moon. Now you need a machine which is a vast number of times more powerful just to run the most popular GUI.