Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Unexpected dataset logger behaviour



I would like to direct your attention to some unexpected behaviour of the dataset logger. This behaviour occurs when I try to log an empty dataset.

Before logging the dataset the ‘IsEmpty’ function returns ‘True’, after logging it returns ‘False’. The ‘Eof’ property displays the same behaviour.

Needles to say that this causes some hard to trace exceptions.

I was wondering if this fact is already known to you?


Hello Gerben,

thanks for reporting the issue. Sorry for the inconveniences the problem caused to you.

Unfortunately, we were unable to reproduce the problem. We tried it with the ADO database classes and the behavior was as expected. To find out more about the problem, it would be great if you could tell us which database classes you use (ADO, BDE etc) either via email or here.


I’m using the TIBQuery component from the ‘Interbase’ tab in Delphi 7. ‘We’ do not use the IBTable component so I can’t say if it displays the same behaviour too.


Hello Gerben,

we could reproduce the problem and it looks like it’s a bug in the TIBQuery class. A bit simplified, reassigning the RecNo property like this

IBQuery1.RecNo := IBQuery1.RecNo;

messes the dataset up if it’s empty. SmartInspect 1.4 will contain a workaround for this behavior and if you need it earlier, you can change the SmartInspect.pas unit:

Just add the following code to line 11289 just before the SendContext call:


And add the following code to line 11248 just before LOriginalRecordPosition is assigned:

if not ADataSet.IsEmpty then

If you apply this fix, please make sure to use the source files instead of the precompiled dcu files. To do this, just replace the SmartInspect library path in Delphi’s environment options with the SmartInspect\source\delphi directory.