Use of DetailDelay

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ibdac2pro
Posts: 17
Joined: Mon 15 Oct 2007 14:26
Location: UK

Use of DetailDelay

Post by ibdac2pro » Thu 10 Jan 2008 09:34

Hi,

I have a Master - Detail relationship with the DetailDelay property of the Detail recordset set to 200.

In my code, I create a Master record and POST it to the database.

I then create a Detail record with an incremental ID based on the number of records in the Detail recordset + 1.

eg. ItemNo := Detail.RecordCount + 1

However, it seems that because the DetailDelay is set to 200, on creation of a new Master plus Detail, the Detail ItemNo is set to the previous Master's Details record count.

Is there any way round this problem without setting the DetailDelay to 0?

Many thanks,

Michael

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

Post by Plash » Fri 11 Jan 2008 09:02

You can execute your own query to get records count in the detail table corresponding a master record.

Post Reply