Page 1 of 1

runtime parameter with master detail

Posted: Fri 17 Feb 2012 01:57
by inageib
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

Posted: Fri 17 Feb 2012 07:38
by AndreyZ
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.

Posted: Fri 17 Feb 2012 15:00
by inageib
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 ?

Posted: Fri 17 Feb 2012 21:54
by inageib
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