First -
"Do I want to overwrite Quote.dbf ?"
If you get this error on your networked computer, then you have not successfully erased/deleted the Quota.dbf prior to running the SQL Query command.
And since you get other errors associated with this, you might look into issues with user Permissions granted to those running the code in regards to the directory where Quote.dbf 'lives'.
Rather than merely referencing Quote.dbf, you might want to put in a full path description.
Code:
USE MyTable in 0
m.Result = "C:\Temp\Quote.dbf"
DELETE (m.Result)
SELECT *;
FROM MyTable;
WHERE FNum = File_num;
NOCONSOLE;
INTO TABLE (m.Result)
Next -
Append from quote
I assume that one the table Quote.dbf is built and populated you use the records somewhere else?
One thought is to get those records directly into the 'somewhere else' without needing to go through the effort of putting them into Quote.dbf in the first place.
When you get the error
File Access Denied it is a clear indication that something has the file 'tied up'. Either another user or another process.
When I encounter these type of problems I use a tool called "WhoHasNT" (
) which enables me to see the file and who is using it.
As to use of Reference by Alias...
When you USE a table, it automatically acquires an Alias which is the table name unless that alias is already in use.
Code:
USE MyTable IN 0 && 'In 0' allows FP to auto-assign workspace
SELECT MyTable && No need to reference by workspace number
I would recommend not naming your 100MB table 1.dbf. It will cause FP some degree of 'confusion' if you should also want to open another table into workspace 1.
Your 100MB table might be opened into workspace #1, but it should have a filename (example: MyTable.dbf). The Alias would not be '1', but instead the filename. If you are using FPW issue a ACTIVATE WINDOW VIEW and you can visually watch this occur.
Good Luck,
JRB-Bldr