PostgreSQL & Master/Details : master key isn't retreived

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

PostgreSQL & Master/Details : master key isn't retreived

Post by swierzbicki » Fri 30 Dec 2011 15:04

Hello,

I've issue with a Master/Details relationship. Master key isn't retreived after inserting a new row into the detail table.

I tried tu set MemDS.RefreshParamsOnInsert to true but it doesn't helps.

AndreyZ

Post by AndreyZ » Wed 04 Jan 2012 11:57

Hello,

To solve the problem you should set the RefreshParamsOnInsert global variable from the MemDS unit to True. To use the RefreshParamsOnInsert global variable, you should add the MemDS unit to the USES clause of your unit. After this, you should assign RefreshParamsOnInsert in the initialization section of your unit in the following way:

Code: Select all

initialization
  RefreshParamsOnInsert := True;
After these steps, you should only rebuild your application. Please check whether these steps solve the problem.
If the problem persists, please try creating a small sample to demonstrate the problem and send it to andreyz*devart*com , including a script to create master and detail tables.

Post Reply