Subject | Re: [IBO] Problem with SearchPanel : Index exceeds maximum |
---|---|
Author | Helen Borrie |
Post date | 2002-11-17T21:01:35Z |
At 07:09 PM 17-11-02 +0100, you wrote:
1. Go into the ColumnAttributes editor and check each of the sub-selected
columns' COMPUTED attribute as true
2. Add the table identifier to your ORDER BY clause:
order By A.name
OR
order by 1
Also, it is not good practice to use table.* in a joined dataset. See
whether listing these columns as P.Fieldname... improves things. This
would also assist with determining whether we are looking at a bug.
If you post again, would you please say which component you are using for
your query.
regards,
Helen
>Using Delphi 7E, IBO 4.2INot sure...but try these two things and see if it makes a difference:
>
>
>The query :
>
>SELECT A.NAME
> , A.VORNAME
> , A.PLZ
> , A.ORT
> , A.STRASSE
> , P.*
> , (select vt.Name from VERTRETER_VIEW vt
> where vt.VertreterKey=p.VertreterKey) as VName
> , (select u.UstProzent from UST u
> where u.UstKey=p.UstKey) as UstProzent
> , (select kn.Name from Konzern_VIEW kn
> where kn.KonzernKey=p.KonzernKey) as KName
> , (select po.Beschreibung from Post po
> where po.PostKey=p.PostKey) as Post
> , (select w.WaehrungLang from Waehrung w
> where w.WaehrungKey=p.WaehrungKey) as Waehrung
> , (select sp.Sprache from Sprache sp
> where sp.Sprachkey=p.Sprachkey) as Sprache
> , (select pt.PartnerText from PartnerTyp pt
> where pt.PartnerTypKey=p.PartnerTypKey) as PartnerTyp
> , (select za.Zahlungsart from ZahlungsArt za
> where za.ZahlungsArtKey=p.ZahlungsArtKey) as ZahlungsArt
> , (select va.VersandArt from VersandArt va
> where va.VersandArtKey=p.VersandArtKey) as VersandArt
>FROM ADRESSEN A
> INNER JOIN PARTNER P ON (A.ADRESSKEY = P.RECHNUNGADRESSKEY)
> where (P.PartnertypKey =:PTyp)and(name starting with :Name)
> order By name
>
>has a result of 44 Columns.
>I have an IB_Searchpanel where i can select a value for Vt.Name.
>If i execute the searchpanel i get an 'exception index value exceeds the
>maximum(39)'.
>
>The (39) seems to be the Columnnumber of Field(vt.Name) in the query.
>During debugging of the procedure ExtractWhereClause in Unit IB_Parse,
>I see that the property IB_Field.Count = 15.
>The statement IB_Field.Statement.sysfields[FieldNo] causes the error.
>
>if i move the subselect for the VT.Name that it becomes a Columnnumber < 15
>all works fine.
>Is this a bug ??
1. Go into the ColumnAttributes editor and check each of the sub-selected
columns' COMPUTED attribute as true
2. Add the table identifier to your ORDER BY clause:
order By A.name
OR
order by 1
Also, it is not good practice to use table.* in a joined dataset. See
whether listing these columns as P.Fieldname... improves things. This
would also assist with determining whether we are looking at a bug.
If you post again, would you please say which component you are using for
your query.
regards,
Helen