Subject | Re: Incompatible behaviour or bug between 4.3.Aa and 4.5B with Masterlink / KeyL |
---|---|
Author | Marco Menardi |
Post date | 2006-01-13T19:11:46Z |
--- In IBObjects@yahoogroups.com, "Jason Wharton" <jwharton@i...> wrote:
tried to reproduce what I stated in my message, I did not succeed,
probably because was not that the problem.
In any case, I've been able to reproduce when the master query has an
aggregate, and I've prepared a modified version of MasterLinks sample
that shows it (I've posted the file mmenaz_MasterLinks.zip in the file
area of this yahoo group).
In short:
I've modified the master query qrCust adding an aggregate:
SELECT
CUSTNO
, SUM(TAXRATE)
FROM CUSTOMER
GROUP BY CUSTNO
The detail query qrOrders has
masterlinks:
ORDERS.CUSTNO=CUSTOMER.CUSTNO
that prevent the detail query to be populated.
If you change it to
ORDERS.CUSTNO=CUSTNO
it works fine. If you remove the aggregate, it works fine in both cases.
AFAIR, it worked fine in both way in 4.3.Aa.
I'm using firebird 1.5:
Server Version: WI-V6.3.2.4731 Firebird 1.5
ODS: 10.1
and delphi 6 pro under windows 2000 sp4
btw, I've a message titled:
"IB_Grid OnCellClick not fired if Ctrl or Shift key is pressed: 4.5B
bug?" of Jan 5, 2006, could you have a look before me having to
revise the code in my app to workaround it (using the OnClick event
instead)?
thanks
Marco Menardi
>Well, in the meantime I've manually fixed all my queries, so when I
> --- Marco Menardi wrote:
> > Hi, I've a lot of problems with my application because some detail
> > queries don't work anymore after upgrading IBO from 4.3.Aa to 4.5B.
> > I noticed this problem but I thought that was a more "permissive"
> > behaviour of the old IBO with queries with grouping or union, but
> > today I've faced the same problem with two "simple" queries, so I
> > think that is a real bug instead.
> > Here what I had and the different behaviour regarding to Masterlink
> > and KeyLink setting:
> >
> > Master query:
> > SELECT BANCA_ID
> > , DESCRIZIONEDISP
> > , SPORTELLO
> > FROM BANCHE
> >
> > KeyLink
> > BANCHE.BANCA_ID
> >
> > Detail query:
> > SELECT CONTO_CORRENTE_ID
> > , BANCA_ID
> > , NUMERO
> > , DESCRIZIONEDISP
> > FROM CONTI_CORRENTE
> >
> > KeyLink
> > (auto)
> >
> > MasterLink:
> > a) CONTI_CORRENTE.BANCA_ID=BANCHE.BANCA_ID
> > this worked fine in 4.3.Aa, but in 4.5B does not anymore (the
> relation
> > is not build, so detail set stays empty)
> >
> > b) BANCA_ID=BANCHE.BANCA_ID
> > c) CONTI_CORRENTE.BANCA_ID=BANCA_ID
> > d) BANCA_ID=BANCA_ID
> >
> > b,c,d work fine
> >
> > Removing KeyLink
> > BANCHE.BANCA_ID
> > or setting it as simply
> > BANCA_ID
> > in the master query has made a) work as before
> >
> > Any clue?
> > regards
> > Marco Menardi
>
> This seems like a very strange problem to be having. What I would
> be more inclined to believe is that you had a mis-spelled table name
> or something. It sounds like a fluke thing. I use fully qualified
> MasterLinks and KeyLinks and they continue to work just fine.
>
> If you can send me a sample app where it is demonstrating what you
> are describing here I will devote some time to look into this.
> Being that you have seen this behavior it should be very simple for
> you to send me a database and a simple app.
>
> Regards,
> Jason Wharton
>
tried to reproduce what I stated in my message, I did not succeed,
probably because was not that the problem.
In any case, I've been able to reproduce when the master query has an
aggregate, and I've prepared a modified version of MasterLinks sample
that shows it (I've posted the file mmenaz_MasterLinks.zip in the file
area of this yahoo group).
In short:
I've modified the master query qrCust adding an aggregate:
SELECT
CUSTNO
, SUM(TAXRATE)
FROM CUSTOMER
GROUP BY CUSTNO
The detail query qrOrders has
masterlinks:
ORDERS.CUSTNO=CUSTOMER.CUSTNO
that prevent the detail query to be populated.
If you change it to
ORDERS.CUSTNO=CUSTNO
it works fine. If you remove the aggregate, it works fine in both cases.
AFAIR, it worked fine in both way in 4.3.Aa.
I'm using firebird 1.5:
Server Version: WI-V6.3.2.4731 Firebird 1.5
ODS: 10.1
and delphi 6 pro under windows 2000 sp4
btw, I've a message titled:
"IB_Grid OnCellClick not fired if Ctrl or Shift key is pressed: 4.5B
bug?" of Jan 5, 2006, could you have a look before me having to
revise the code in my app to workaround it (using the OnClick event
instead)?
thanks
Marco Menardi