Master Detail TUniQuery is creating parameter

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
flyy
Posts: 17
Joined: Fri 18 Sep 2009 08:34

Master Detail TUniQuery is creating parameter

Post by flyy » Thu 24 Dec 2009 21:18

hi,

i realized that when i assign a master source to a UniQuery, it creates a parameter for DetailFields on dataset. My problem is not a bug or error actually.
I have 2 tables,

Table1(
Code
Definitionn)

Table2(
Code_Table1,
Code,
Definition)

table 2 is detail of table1 and "code_table1" field on table2 is referencing to table1 "Code" fields.

when i create 2 uniquery and set up master source for table2. it creates a parameter by name "CODE" , i mean parameter name is MasterField name but logically isnt it better, name of parameter would be DetailKey.

In my project i create a standart and every parameter name is equal to field name that it is assigned to.
but this master detail relation is creating a parameter like Code_table1 = :Code
and i have a code field also on table2 too...

is it possible, using DetailField as parameter name in uniquery?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 28 Dec 2009 09:06

Parameters are assigned from the master fields with the same name. So the parameter for master/detail must be named "CODE".

Post Reply