Re: How does a SQL command find a table which is not in the current db

From: Stefan Wuebbe (stefan.wuebbe_at_gmx.de)
Date: 03/24/05


Date: Thu, 24 Mar 2005 05:47:10 +0100


"Peter" <Peter@discussions.microsoft.com> schrieb im Newsbeitrag
news:52DA1B97-7838-4A2B-A60D-0F01A67B28C9@microsoft.com...
> 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
 ----------------------------------------------------------- 


Relevant Pages

  • How does a SQL command find a table which is not in the current db
    ... It seems to me that if I issue a SQL statement such as select * from tableX ... tableX based on the path of the current dbc. ... resultset. ...
    (microsoft.public.fox.vfp.dbc)
  • Re: List multiple tables in a Connection string?
    ... You either connect to the DBC or you connect to a folder. ... Microsoft Visual FoxPro MVP ... > is it possible to list multple tables in my connection string? ... > to create a sql statement via my vb.net app that connects to a foxpro db ...
    (microsoft.public.fox.vfp.dbc)
  • Re: Setting directory
    ... See the documentation for SET DEFAULT TO, SET PATH TO, CD, MD, RD. ... also JustFName, JustExt, JustStem, JustPath(), DBC(), DBF(). ...
    (microsoft.public.fox.programmer.exchange)