Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug or Feature?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00177070
Message ID:
00177123
Views:
27
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform