Page 1 of 1

TUniTable MasterSource / MasterFields properties

Posted: Fri 27 Jun 2014 06:37
by testpresta
Hello

I want to filter an UniTable data from a foreign key value.
I tried Mastersource at MasterFields. I had to put a TDataSource.

For example, suppose a have a customer table and an order table.

I tried to do something like this:

Code: Select all

order.MasterSource:=customer_datasource;
order.masterFields:='customer_id';
It doesn t work because i fetch all orders in order UniTable Object.

Is there a bug or something wrong in my code ?

Thanks

Re: TUniTable MasterSource / MasterFields properties

Posted: Fri 27 Jun 2014 06:56
by testpresta
Note: If i set those properties in object inspector, it works !
It does not work when i set MasterSource and MasterFields properties progammaticly at runtime.
Can anyone explain me why ?

Thanks

Re: TUniTable MasterSource / MasterFields properties

Posted: Fri 27 Jun 2014 08:26
by AlexP
Hello,

Try to reproduce the problem on the latest UniDAC version 5.3.9. If the problem repeats, please send us a sample reproducing the problem.

P.S. Please specify the name of the DB you are working.

Re: TUniTable MasterSource / MasterFields properties

Posted: Fri 27 Jun 2014 13:27
by testpresta
Sorry it is my fault.
I forgot to set DetailFields property.

Thanks

Re: TUniTable MasterSource / MasterFields properties

Posted: Fri 27 Jun 2014 14:25
by Dimon
Feel free to contact us if you have any further questions.