Subject | Re: [IBO] Master detail problem when lenght of the link field is more than 25 chars |
---|---|
Author | Helen Borrie |
Post date | 2004-08-04T10:06:27Z |
At 06:49 PM 3/08/2004 +0000, you wrote:
identifiers longer than 24 characters. Firebird identifiers simply can not
exceed 31 characters in length. IBO needs to "borrow" between 5 and 7
characters for handling master-detail.
conditions, the suffix, to determine the origin of results returned in the
XSQLDA.
But with native IBO you are not restricted to using the same name as column
name for parameters. It's only a limitation with the TDataset
master-detail linking. If you prefer the benefits of MasterLinks, use
shorter names for your parameters and write a bit of extra assignment code
in your BeforePost handlers.
If you want to force IBO to use your long identifiers as parameter names,
you should use the MasterParamLinks technique instead of MasterLinks.
that you have identifiers that are more than 25 in length.
Helen
>CREATE TABLE dep (Yes, with IBO you need to regard it as a problem if you have column
> id_dep INTEGER NOT NULL,
> name VARCHAR(50) NOT NULL,
> CONSTRAINT dep_pk PRIMARY KEY (id_dep)
>);
>
>COMMIT;
>
>CREATE TABLE person (
> id_person INTEGER NOT NULL,
> name VARCHAR(50) NOT NULL,
> id_dep_123456789_123456789 INTEGER NOT NULL,
> CONSTRAINT person_pk PRIMARY KEY (id_person)
>);
>
>qryDep - master
>qryPerson - detail
>Master Links:
>person.id_dep_123456789_123456789=dep.id_dep
>
>When I open qryPerson I get this error:
>FieldName: MLNK_ID_DEP_123456789_123456789_0 not found
>
>I think the problem lies in the way IBO names the parameter for the
>detail:
>MLNK_ID_DEP_123456789_123456789_0 = 33 chars
>If the detail has the link field named:
>id_dep_123456789_12345678 then it works.
>So if the link field from detail has the length <= 25 it's ok.
identifiers longer than 24 characters. Firebird identifiers simply can not
exceed 31 characters in length. IBO needs to "borrow" between 5 and 7
characters for handling master-detail.
>Question: Can I tell IBO how to name the master detail parameter fromThat's exactly what MasterLinks does but it needs the prefix and, in some
>the Master Links?
conditions, the suffix, to determine the origin of results returned in the
XSQLDA.
But with native IBO you are not restricted to using the same name as column
name for parameters. It's only a limitation with the TDataset
master-detail linking. If you prefer the benefits of MasterLinks, use
shorter names for your parameters and write a bit of extra assignment code
in your BeforePost handlers.
If you want to force IBO to use your long identifiers as parameter names,
you should use the MasterParamLinks technique instead of MasterLinks.
>Test case uploaded: Problem-MasterDetail.zipI do understand why you consider it's a problem for you.
>ps: I really have fields that are more than 25 in length.That statement seems to have confused some people. I think you mean to say
that you have identifiers that are more than 25 in length.
Helen