Discussion:
How does a SQL command find a table which is not in the current db
(too old to reply)
Peter
2005-03-24 03:05:05 UTC
Permalink
It seems to me that if I issue a SQL statement such as select * from tableX
and tableX is not in the current dbc, the SQL statement will search for
tableX based on the path of the current dbc. So, if the current dbc is
located in c:\vfp\test, the SQL statement will search for tableX in
c:\vfp\test. If tableX is in c:\vfp\test, the SQL statement will return a
resultset. If it is not, it will ask for a directory.


Thanks.
Stefan Wuebbe
2005-03-24 04:47:10 UTC
Permalink
Post by Peter
It seems to me that if I issue a SQL statement such as select * from tableX
and tableX is not in the current dbc, the SQL statement will search for
tableX based on the path of the current dbc. So, if the current dbc is
located in c:\vfp\test, the SQL statement will search for tableX in
c:\vfp\test. If tableX is in c:\vfp\test, the SQL statement will return a
resultset. If it is not, it will ask for a directory.
That's true. The traditional free-tables way is to Set Path To x,y,z
With DBCs you can work w/o Set Path if you want, except in a
mixed scenario with DBCs and free tables at the same time, e.g.
Set Path To (cFreeTablesFolder) Additive
Set Path To (cDbcFolder) Additive
Open Database myDbc.dbc Shared
Use freeTable.dbf In 0 Shared

Does that help?
-Stefan
--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------
Loading...