Subject | TIBODataset.GetValuesFromMaster is case-sensitive |
---|---|
Author | |
Post date | 2019-02-27T09:04:38Z |
Hello!
Just found out that if the detail datasets parameter is coded using lower-case and the fieldname of the master does NOT match the parameter name then the function fails. In this case if the fieldname and parameter names are the same (but with different case) it works because of a fallback.
This is confusing because i thought the names must match (that is messy).
These lines:
i := iboPos( InternalDataset.ParamChar +
tmpCol.FieldName, tmpSQL ) - 1;
if i >= 0 then
does an case-sensitive comparison.
These lines is the fallback when the names are the same:
if not Assigned( NewField ) then
NewField := Self.FindField( tmpCol.FieldName );
So if the master has a field ID then this detail:
Select *
from detail d
where d.master_id = :id
fails
Select *
from detail d
where d.master_id = :ID
works!
Select *
from detail d
where d.id = :id
works!
Please fix!
TIA,
/Dany