Subject RE: [IBO] Re: Master detail problem when lenght of the link field is more than 25 chars
Author Jason Wharton
Thank you for pressing me on this bug. I finally figured out what the
problem was and have fixed it for the next release.

All the best!

Jason Wharton


> -----Original Message-----
> From: Mihai Chezan [mailto:gsmcq@...]
> Sent: Friday, August 06, 2004 5:25 PM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] Re: Master detail problem when lenght of the link field
> is more than 25 chars
>
>
> > Change the the foreign key column's identifier to be 24 characters
> > or less.
> Thank you. That was the answer that I was looking for.
>
> Why am I insisting on this?
> Because I consider this to be a bug and I think it should be taken
> into consideration and fixed in a new version.
> Why is this a bug?
> When I set the MasterLinks I get no warning/error but when I run the
> program I get an exception with the error message:
> "FieldName: MLNK_.........._0 not found".
> Who generates the "MLNK_.........._0" field? IBO does.
> So if this is an ibo limitation then just check the input parameters
> (at design time when I set the MasterLinks) and if they are
> wrong give
> me a message so I understand the problem.
> A better fix would be to not have this limitation at all: just don't
> generate a parameter that is longer than 32 chars.
> Why does ibo have to generate the name for the parameter like this:
> MLNK_field_name_0?
> Why not generate names like Param1, Param2, .....
> If it must keep a mapping then do it in ibo:
> "Param1" - field name "Field_name_1"
> "Param2" - .....
>
> I consider the second approach better (not having the limitation)
> since you can't always modify the names of your fields.
> And having this limitation is like saying: you can link two datasets
> in a master detail relation (using the MasterLinks) only if the link
> field identifier from the child dataset is less than 25 chars in
> length.
>
> ps: just done some more tets and...
> If I use an IB_Query with a parameter longer than 32 chars it works:
> select * from table1 where id=:123456789_123456789_123456789_123456789
> So it seems that ibo doesn't have the 32 limitation.
> If in my test case at design time I prepare the qrPerson and I
> manually set the "MLNK_ID_DEP_123456789_123456789_0" parameter and
> then I open the query it works. So why doesn't works at runtime?
> So this must be a bug.