Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET PATH query
Message
From
27/04/2012 10:48:53
 
 
To
27/04/2012 10:24:00
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01541961
Message ID:
01542776
Views:
56
Hi Mike,

as you can see from my profile, I am also back in my home country. Your comment about Set Deleted is not true if you have a binary index tag on deleted, which is recommended by many VFP gurus. The binary index was introduced in VFP9, and the speed of Set Deleted was one of the reason why it was introduced.

>Hi Matt! :)
>
>Of course VFP expects one will access a given table more than once. It has pretty rigorous caching. I've always been surprised at how many prefer to close tables after just about every access, or to use FLUSH too much.
>
>FYI, when VFP opens a table, if SET DELETED is ON, there can be a very significant delay as VFP moves to the first undeleted record. It's not so easy to see on a local machine, but across a slow LAN it becomes evident.
>
>
>>It has ALWAYS annnoyed me that when issuing a SQL Select statement (on tables that are not USED yet), that VFP will USE the table and then *LEAVE IT OPEN*. I would prefer that it not be left open (unless it was already in USE)
>>
>>
>>#CloseDaTableFoxPro
>>
>>
>>
>>
>>
>>
>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform