Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Network:
Windows 2003 Server
Tore
That's it. I had been wondering along the same lines myself, but only issued CLOSE TABLES ALL, not CLOSE DATABASE ALL. The former does NOT clear the path from VFP memory and it still uses the old table it even after the path change, but the latter DOES force VFP to recognise the path and use the correct table.
A useful tip to remember! Thanks - I was starting to think I was losing the plot!
Barry
>I have a theory, but I am not absolutely sure about it. Anyway, here it goes: When you run a query against a DBF, VFP remebers which table you selected from, and may even keep it open, depending on what kind of query you run. So the next time you run a query, although you specify another path, VFP uses the table which is already open. Solution: Close the old dbf, issue Close database all, or make sure to specify the whole path.
>
>>I am having a "blind" moment:
>>
>>On my local development pc I have a folder C:\MYDATA\DBFS
>>
>>I am running a query which utilises tables from this folder e.g. invent.dbf
>>
>>I am setting the search path as follows:
>>SET PATH TO C:\MYDATA\DBFS\
>>
>>When I run the query and inspect the debugger, I can see the path is set correctly to C:\MYDATA\DBFS and the dbf() returns C:\mydata\dbfs\invent.dbf
>>
>>I now set
>>
>>SET PATH TO S:\MYDATA\DBFS\
>>
>>to run the query against a server data set.
>>
>>Now when I inspect the debugger I can again see the path is correctly changed to S:\MYDATA\DBFS\, but the dbf() still returns C:\mydata\dbfs\invent.dbf instead of what I was intending i.e. S:\mydata\dbfs\invent.dbf.
>>
>>Why is the dbf on the S path not being picked up?
>>
>>Barry Sutton
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement