master detail problem

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
luis_augusto
Posts: 43
Joined: Fri 14 Oct 2005 13:45

master detail problem

Post by luis_augusto » Mon 29 Aug 2011 22:30

Suppose I have two queries: Master and Detail.
I want that, when I just finished to input the content of the masterfield in the the Master table (during an edition/insertion) , Detail´s records appear promptly.
This was the standard behaviour in SDAC, but seems to be different in Unidac.
I noticed that the masterfield parameter in Detail table is assigned with null (which is the default value for the master field, in the beginning of an insertion) but it is not updated when the master field value changes in the master table.
Is there any parameter in the source code or in one of the components where I can change this behaviour?

luis_augusto
Posts: 43
Joined: Fri 14 Oct 2005 13:45

Please, document the RefreshParamsOnInsert global variable

Post by luis_augusto » Tue 30 Aug 2011 13:20

I found the "RefreshParamsOnInsert" global variable, in MemDS unit, which solved the problem.
It would be nice to document this variable in Unidac help, since the old behaviour is largely used.

One simple example is when I have to fill an invoice that was preceeded by a Purchase Order.
I don´t know which purchase Order is, then I retrieve all P.Os of a customer for users to choose.
But I only fill the customer's code in the middle of the Invoice Form, when my master table is demi-filled. That´s when I expect to fill a grid with the P.Os.

AndreyZ

Post by AndreyZ » Wed 31 Aug 2011 09:48

We will describe the RefreshParamsOnInsert global variable in the UniDAC documentation.
I've redirected your question concerning Purchase Order to our sales department.

Post Reply