TUniTable MasterSource / MasterFields properties

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
testpresta
Posts: 32
Joined: Sat 07 Jun 2014 19:41

TUniTable MasterSource / MasterFields properties

Post by testpresta » Fri 27 Jun 2014 06:37

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

testpresta
Posts: 32
Joined: Sat 07 Jun 2014 19:41

Re: TUniTable MasterSource / MasterFields properties

Post by testpresta » Fri 27 Jun 2014 06:56

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

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TUniTable MasterSource / MasterFields properties

Post by AlexP » Fri 27 Jun 2014 08:26

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.

testpresta
Posts: 32
Joined: Sat 07 Jun 2014 19:41

Re: TUniTable MasterSource / MasterFields properties

Post by testpresta » Fri 27 Jun 2014 13:27

Sorry it is my fault.
I forgot to set DetailFields property.

Thanks

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: TUniTable MasterSource / MasterFields properties

Post by Dimon » Fri 27 Jun 2014 14:25

Feel free to contact us if you have any further questions.

Post Reply