No results in detail table, when master field is NULL

Discussion of open issues, suggestions and bugs regarding LiteDAC (SQLite Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
FrankS
Posts: 2
Joined: Tue 12 Nov 2013 13:10

No results in detail table, when master field is NULL

Post by FrankS » Tue 12 Nov 2013 14:07

Hello,

I'm using Delphi XE 4 with a Firemonkey form connected to a SQLite database and I have the following problem:

I have two tables connected by a master-detail relationship.
LiteQuery fails to populate the detail table, when a master field is NULL. Is there any possibility to show these records in the detail table (where the master's field value corresponds to the detail's field value in being NULL)?

Thanks for any ideas!
Frank

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: No results in detail table, when master field is NULL

Post by AlexP » Wed 13 Nov 2013 08:56

Hello,

Thank you for the information. We have reproduced and fixed the problem. This fix will be included to the next version.
For the time being, you can not specify the MasterField and DetailField parameters in detail DataSet, and add the following where section manually:

Code: Select all

WHERE DEPTNO = :DEPTNO OR (DEPTNO IS NULL AND :DEPTNO IS NULL)

FrankS
Posts: 2
Joined: Tue 12 Nov 2013 13:10

Re: No results in detail table, when master field is NULL

Post by FrankS » Wed 13 Nov 2013 11:33

Thank you for your quick reply!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: No results in detail table, when master field is NULL

Post by AlexP » Wed 13 Nov 2013 12:02

Hello,

If you have any other questions, feel free to contact us.

Post Reply