Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug or Feature?
Message
 
À
18/01/1999 11:03:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00177070
Message ID:
00177257
Vues:
34
Good one Jim...

Yep, an index based on another table field with the Alias. Pretty obscure and one that does not jump out at your during the debugging phase!!

< JVP >

>Silvio (sorry John),
>
>I supoose that "vanilla tables" could include a 'filtered' index, possibly even one referring to a function.
>
>That would be another place to look for a "MASTER" alias reference.
>
>Good luck,
>
>Jim N
>
>>Somewhere on the form, probably in the ControlSource - or perhaps a rowsouce in the case of List/Combo or the Recordsource in the case of a grid, is referencing MASTER as an alias. Check through the controls and these properties, and it should popup. Also, check the code for any references to MASTER.
>>
>>
>>>I was called by a team working on a new application to solve a mistery. Solved it... and walked away with this new one.
>>>I'll change the names of the tables to make it easier to follow.
>>>
>>>In the database there are these two tables MASTER with id as PK and DETAIL that links to MASTER through a field called idMASTER. No relations set anywhere nor RI nor triggers. Just plain vanilla tables.
>>>
>>>They had made a form based on a MASTER table and given it mt_MASTER for alias (tha idea was that mt_ stood for main table). The DE had a cursor based on MASTER with mt_MASTER as an alias.
>>>
>>>The RecordSource for a grid in the same form is based on a p-view on the table DETAIL. The default value for the idMaster column that links the two tables was set using DbSetProp() as MASTER.id. Note that it si not mt_MASTER, just the plain table name
>>>
>>>Now, when run, the form complained because it could not find MASTER and so MASTER was added to the DE. And the form run ok. How is it possible?
>>>
>>>Data is being retrived, deleted and saved correctly but it is mt_MASTER that controls the form and not the table added later. Nowhere in the form is MASTER on it's own referenced.
>>>
>>>I've changed the form to get rid of the offending "mt_" prefix in the alias and all works as expected but the problem remains: why did it work before? What if there really was the need to have the same table opened 2 times in the DE for other reasons?.
>>>
>>>TIA
>>>
>>>Silvio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform