Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select from unintended table
Message
De
04/04/2003 04:41:09
 
 
À
04/04/2003 02:43:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00773439
Message ID:
00773910
Vues:
15
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform