Home arrow Support arrow Gurock Software Forum arrow General Discussion arrow Unexpected dataset logger behaviour

Subscribe to forum RSS Forum

Unexpected dataset logger behaviour

New Topic Post Reply

Page: 1

Author Post
Gerben
Guest
Hi,

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?
Administrator
Registered: Sep 2007
Posts: 133
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.
Gerben
Guest
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.
Administrator
Registered: Sep 2007
Posts: 27
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:

-------------------------------------
end;
-------------------------------------

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

-------------------------------------
if not ADataSet.IsEmpty then
begin
-------------------------------------

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.
_______________
Dennis Gurock, Co-Founder
Gurock Software GmbH

New Topic Post Reply

Page: 1