Page 1 of 1

Use of DetailDelay

Posted: Thu 10 Jan 2008 09:34
by ibdac2pro
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

Posted: Fri 11 Jan 2008 09:02
by Plash
You can execute your own query to get records count in the detail table corresponding a master record.