Raise Exceptionwhen using QueryRecordCount=true

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
enzorubino
Posts: 7
Joined: Tue 24 Jul 2007 16:04

Raise Exceptionwhen using QueryRecordCount=true

Post by enzorubino » Fri 26 Feb 2010 16:23

Hi,
In Delphi6 IDE with TUNIQuery connected to SQLite provider,

if i set QueryRecordCount option to true, when i try to use RecordCount property it raise this exception:

...EAssertionFailes with message '23 (D:\Projects\Delphi\Dac\Common\Source\CRAccess.pas, line 2822)'. Process Stopped.....

this is example code:

with UNIQuery1 do
begin
..
Options.QueryRecordCount=true;
..
if (RecordCount>0) <<< ERROR
then..
end;

thanks for help

tobias_cd
Posts: 56
Joined: Thu 18 Dec 2008 22:10

Post by tobias_cd » Fri 26 Feb 2010 19:02

Maybe there's simply an "Open" missing before use of RecordCount (regardless of the option).

enzorubino
Posts: 7
Joined: Tue 24 Jul 2007 16:04

open is present

Post by enzorubino » Tue 02 Mar 2010 10:39

Command open is present before testing recordcount member, see code:

with UNIQuery1 do
begin
..
Options.QueryRecordCount=true;
Open;
if (RecordCount>0) <<< ERROR
then..
end;

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 03 Mar 2010 14:21

Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next UniDAC build.

Post Reply