runtime parameter with master detail

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
inageib
Posts: 184
Joined: Wed 26 Aug 2009 14:11

runtime parameter with master detail

Post by inageib » Fri 17 Feb 2012 01:57

Hi,
I use Firebird 2.5 and have two data sets in a master detail relation and the detail dataset sql like that:

Code: Select all

select * from detail_table
where (detail_table.m_id = :m_id) and (is_true like :w)
is_true is smallint field

and I set the mastersource property of the detail table to the master table

at run-time I provide the parameter value like this

Code: Select all

detail_table.ParamByName('w').AsString := '%';
detail_table.Open;
but when I navigate the master table the records from the detail table does not show up. it does if I removed this part "and (is_true like :w)"

why is that and how to fix

thanks

AndreyZ

Post by AndreyZ » Fri 17 Feb 2012 07:38

Hello,

I checked this questions and there were no problems with showing records. Your query returns records that match master record and have the is_true column value other than null. Please check if such records exist in your detail table. If they exist and you still don't see them showing up, please specify the following:
- a script to create and fill your master and detail tables;
- the exact version of IBDAC. You can learn it from the About sheet of TIBCConnection Editor;
- the exact version of your IDE.

inageib
Posts: 184
Joined: Wed 26 Aug 2009 14:11

Post by inageib » Fri 17 Feb 2012 15:00

will check again but I want to make sure the parameter :m_id getting its value from the master table while the parameter :w I provided only once when the form show up. is that correct ?

inageib
Posts: 184
Joined: Wed 26 Aug 2009 14:11

Post by inageib » Fri 17 Feb 2012 21:54

found the problem
it is is_true has a null value !! it is not the first time I stop because of the bloody null value

Thanks

Post Reply