Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select from unintended table
Message
From
04/04/2003 04:41:09
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00773439
Message ID:
00773910
Views:
14
>Hi Gregory,
>
>Sorry, my example wasn't a good one - I *was* in fact using full paths in all statements e.g:
>
>
>OPEN DATABASE "C:\myPathA\myDBC"
>OPEN DATABASE "C:\myPathB\myDBC"
>SET DATABASE TO "C:\myPathA\myDBC"
>USE myView   && View defined in myPathA\DBC "Select * from myDBC!myTable"
>SELECT myTable    && Underlying table opened by View
>? DBF()    && = myPathB\myDBC
>
>
>If it's working for you maybe it's a version thing. My test was in VFP6 (haven't tried it in 7/8). What version were you using ?
>
>BTW I notice that the ADATA() array always lists databases in reverse order of opening (i.e. most recent is first row)
>
>Regards,
>Viv

Hi Viv,

I am using vfp6sp5 (still)

You are correct re the reverse order of adata()

Two things are different compared to my situation. The first may not be important. The second is imo.

(1) SET DATABASE TO ("C:\myPathA\myDBC.dbc")

(2) View defined in myPathA\DBC "Select * from myDBC!myTable"
Can you change this into 'select * from MyTable', ie without the mydbc!
I believe that when you hard code the database in a select you are back to square one, ie it ignores the 'set database', whereas if you do not hard code the database it uses the current database

Change the two things and see what happens ...

Success,
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform