Subject | Re: Interbase to Firebird conversion, Delphi |
---|---|
Author | ulrickebester |
Post date | 2008-11-06T14:14:25Z |
I got it :)
I get:
/* SQL */
select
kd.kaart_detail_id,
cf.displayname_a,
cf.displayname_e,
cf.displayfield,
cf.tablename,
cf.lookuptable,
cf.lookupfield,
kd.card_caption,
cf.card_group,
cf.idfield,
cf.idvalue
from
cardfields cf
join kaart_detail kd on cf.cardfields_id = kd.cardlookup_id
join kaarte k on kd.kaarte_id = k.kaarte_id
where k.kaarte_id = ?
order by kd.kaart_detail_id
/* PLAN */
PLAN SORT (JOIN (K INDEX (RDB$PRIMARY102), KD INDEX (RDB$FOREIGN235),
CF INDEX (RDB$PRIMARY9)))
/* EXECUTE PARAMETERS */
PARAM_0 = 61
/* SQL */
select skaap.skaap_id from skaap where skaap.skaap_id is not null and
((skaap.moeder_id = '25966') or (skaap.vader_id = '25966')) order by
skaap.skaap_nommer_jaar
DESC,skaap.skaap_nommer_volg,skaap.skaap_nommer_stoet;
/* PLAN */
PLAN SORT ((SKAAP INDEX (XMOEDER, XVADER)))
/* SQL */
select SKAAP.SKAAP_ID from SKAAP where SKAAP.skaap_id is not null
and ((skaap.moeder_id = '25966') or (skaap.vader_id = '25966'))
order by skaap.skaap_nommer_jaar
DESC,skaap.skaap_nommer_volg,skaap.skaap_nommer_stoet;
/* PLAN */
PLAN SORT ((SKAAP INDEX (XMOEDER, XVADER)))
/* SQL */
SELECT
SKAAP.SKAAP_NOMMER_JAAR,SKAAP.SKAAP_NOMMER_VOLG,SKAAP.SKAAP_NOMMER_STO
ET FROM SKAAP WHERE SKAAP.SKAAP_ID is not null and ((skaap.moeder_id
= '25966') or (skaap.vader_id = '25966')) order by
skaap.skaap_nommer_jaar
DESC,skaap.skaap_nommer_volg,skaap.skaap_nommer_stoet;
/* PLAN */
PLAN SORT ((SKAAP INDEX (XMOEDER, XVADER)))
/* SQL */
select SKAAP.MOEDER_ID from SKAAP where SKAAP.skaap_id is not null
and ((skaap.moeder_id = '25966') or (skaap.vader_id = '25966'))
order by skaap.skaap_nommer_jaar
DESC,skaap.skaap_nommer_volg,skaap.skaap_nommer_stoet;
/* PLAN */
PLAN SORT ((SKAAP INDEX (XMOEDER, XVADER)))
/* SQL */
SELECT S.SKAAP_ID,M.SKAAP_ID,M.SKAAP_NOMMER_STOET AS
MSTOET,M.SKAAP_NOMMER_JAAR AS MJAAR,M.SKAAP_NOMMER_VOLG AS MVOLG
FROM (SKAAP S LEFT JOIN SKAAP M ON S.MOEDER_ID = M.SKAAP_ID) WHERE
S.SKAAP_ID IS NOT NULL and ((S.moeder_id = '25966') or (S.vader_id
= '25966')) order by S.skaap_nommer_jaar
DESC,S.skaap_nommer_volg,S.skaap_nommer_stoet;
/* PLAN */
PLAN SORT (JOIN (S INDEX (XMOEDER, XVADER), M INDEX (RDB$PRIMARY54)))
/* SQL */
select SKAAP.VADER_ID from SKAAP where SKAAP.skaap_id is not null
and ((skaap.moeder_id = '25966') or (skaap.vader_id = '25966'))
order by skaap.skaap_nommer_jaar
DESC,skaap.skaap_nommer_volg,skaap.skaap_nommer_stoet;
/* PLAN */
PLAN SORT ((SKAAP INDEX (XMOEDER, XVADER)))
/* SQL */
SELECT S.SKAAP_ID,F.SKAAP_NOMMER_STOET AS FSTOET,F.SKAAP_NOMMER_JAAR
AS FJAAR,F.SKAAP_NOMMER_VOLG AS FVOLG
FROM (SKAAP S LEFT JOIN SKAAP F ON S.VADER_ID = F.SKAAP_ID) WHERE
S.SKAAP_ID is not null and ((S.moeder_id = '25966') or (S.vader_id
= '25966')) order by S.skaap_nommer_jaar
DESC,S.skaap_nommer_volg,S.skaap_nommer_stoet;
/* PLAN */
PLAN SORT (JOIN (S INDEX (XMOEDER, XVADER), F INDEX (RDB$PRIMARY54)))
/* SQL */
select SKAAP.GEBOORTEDATUM from SKAAP where SKAAP.skaap_id is not
null and ((skaap.moeder_id = '25966') or (skaap.vader_id
= '25966')) order by skaap.skaap_nommer_jaar
DESC,skaap.skaap_nommer_volg,skaap.skaap_nommer_stoet;
/* PLAN */
PLAN SORT ((SKAAP INDEX (XMOEDER, XVADER)))
/* SQL */
/* PLAN */
and the last plan is not visible when I get the error
?
--- In firebird-support@yahoogroups.com, "Michel Veerman"
<m.veerman@...> wrote:
I get:
/* SQL */
select
kd.kaart_detail_id,
cf.displayname_a,
cf.displayname_e,
cf.displayfield,
cf.tablename,
cf.lookuptable,
cf.lookupfield,
kd.card_caption,
cf.card_group,
cf.idfield,
cf.idvalue
from
cardfields cf
join kaart_detail kd on cf.cardfields_id = kd.cardlookup_id
join kaarte k on kd.kaarte_id = k.kaarte_id
where k.kaarte_id = ?
order by kd.kaart_detail_id
/* PLAN */
PLAN SORT (JOIN (K INDEX (RDB$PRIMARY102), KD INDEX (RDB$FOREIGN235),
CF INDEX (RDB$PRIMARY9)))
/* EXECUTE PARAMETERS */
PARAM_0 = 61
/* SQL */
select skaap.skaap_id from skaap where skaap.skaap_id is not null and
((skaap.moeder_id = '25966') or (skaap.vader_id = '25966')) order by
skaap.skaap_nommer_jaar
DESC,skaap.skaap_nommer_volg,skaap.skaap_nommer_stoet;
/* PLAN */
PLAN SORT ((SKAAP INDEX (XMOEDER, XVADER)))
/* SQL */
select SKAAP.SKAAP_ID from SKAAP where SKAAP.skaap_id is not null
and ((skaap.moeder_id = '25966') or (skaap.vader_id = '25966'))
order by skaap.skaap_nommer_jaar
DESC,skaap.skaap_nommer_volg,skaap.skaap_nommer_stoet;
/* PLAN */
PLAN SORT ((SKAAP INDEX (XMOEDER, XVADER)))
/* SQL */
SELECT
SKAAP.SKAAP_NOMMER_JAAR,SKAAP.SKAAP_NOMMER_VOLG,SKAAP.SKAAP_NOMMER_STO
ET FROM SKAAP WHERE SKAAP.SKAAP_ID is not null and ((skaap.moeder_id
= '25966') or (skaap.vader_id = '25966')) order by
skaap.skaap_nommer_jaar
DESC,skaap.skaap_nommer_volg,skaap.skaap_nommer_stoet;
/* PLAN */
PLAN SORT ((SKAAP INDEX (XMOEDER, XVADER)))
/* SQL */
select SKAAP.MOEDER_ID from SKAAP where SKAAP.skaap_id is not null
and ((skaap.moeder_id = '25966') or (skaap.vader_id = '25966'))
order by skaap.skaap_nommer_jaar
DESC,skaap.skaap_nommer_volg,skaap.skaap_nommer_stoet;
/* PLAN */
PLAN SORT ((SKAAP INDEX (XMOEDER, XVADER)))
/* SQL */
SELECT S.SKAAP_ID,M.SKAAP_ID,M.SKAAP_NOMMER_STOET AS
MSTOET,M.SKAAP_NOMMER_JAAR AS MJAAR,M.SKAAP_NOMMER_VOLG AS MVOLG
FROM (SKAAP S LEFT JOIN SKAAP M ON S.MOEDER_ID = M.SKAAP_ID) WHERE
S.SKAAP_ID IS NOT NULL and ((S.moeder_id = '25966') or (S.vader_id
= '25966')) order by S.skaap_nommer_jaar
DESC,S.skaap_nommer_volg,S.skaap_nommer_stoet;
/* PLAN */
PLAN SORT (JOIN (S INDEX (XMOEDER, XVADER), M INDEX (RDB$PRIMARY54)))
/* SQL */
select SKAAP.VADER_ID from SKAAP where SKAAP.skaap_id is not null
and ((skaap.moeder_id = '25966') or (skaap.vader_id = '25966'))
order by skaap.skaap_nommer_jaar
DESC,skaap.skaap_nommer_volg,skaap.skaap_nommer_stoet;
/* PLAN */
PLAN SORT ((SKAAP INDEX (XMOEDER, XVADER)))
/* SQL */
SELECT S.SKAAP_ID,F.SKAAP_NOMMER_STOET AS FSTOET,F.SKAAP_NOMMER_JAAR
AS FJAAR,F.SKAAP_NOMMER_VOLG AS FVOLG
FROM (SKAAP S LEFT JOIN SKAAP F ON S.VADER_ID = F.SKAAP_ID) WHERE
S.SKAAP_ID is not null and ((S.moeder_id = '25966') or (S.vader_id
= '25966')) order by S.skaap_nommer_jaar
DESC,S.skaap_nommer_volg,S.skaap_nommer_stoet;
/* PLAN */
PLAN SORT (JOIN (S INDEX (XMOEDER, XVADER), F INDEX (RDB$PRIMARY54)))
/* SQL */
select SKAAP.GEBOORTEDATUM from SKAAP where SKAAP.skaap_id is not
null and ((skaap.moeder_id = '25966') or (skaap.vader_id
= '25966')) order by skaap.skaap_nommer_jaar
DESC,skaap.skaap_nommer_volg,skaap.skaap_nommer_stoet;
/* PLAN */
PLAN SORT ((SKAAP INDEX (XMOEDER, XVADER)))
/* SQL */
/* PLAN */
and the last plan is not visible when I get the error
?
--- In firebird-support@yahoogroups.com, "Michel Veerman"
<m.veerman@...> wrote:
>(presuming
> You might consider using UIBSQLMonitor. It allows you to see exactly
> which queries are sent to the database by your application
> that your application is using fbclient.dll or gds32.dll).direct
>
> Strangly they don't have an info page no more, so I only have the
> link for you:can
>
> http://www.progdigy.com/files/UIBSQLMonitor.zip
>
>
>
> Kind regards,
> Michel
>
>
>
> ________________________________
>
> Van: firebird-support@yahoogroups.com
> [mailto:firebird-support@yahoogroups.com] Namens ulrickebester
> Verzonden: donderdag 6 november 2008 13:22
> Aan: firebird-support@yahoogroups.com
> Onderwerp: [firebird-support] Re: Interbase to Firebird conversion,
> Delphi
>
>
>
> The problem must be in the generated SQL. If you post that then we
> have a look.you
>
> Will you please tell me how to do that..then I can post it? Thank
><mail@>
> --- In firebird-support@yahoogroups.com
> <mailto:firebird-support%40yahoogroups.com> , "davidalbiston"
>we
> wrote:
> >
> > The problem must be in the generated SQL. If you post that then
> can<mail@>
> > have a look.
> >
> > --- In firebird-support@yahoogroups.com
> <mailto:firebird-support%40yahoogroups.com> , "ulrickebester"
> > <umeinhof@> wrote:
> > >
> > > Yes I do,
> >
> > > I get the error on skaap.FAMILIE_ID and on
> skaap.GEBOORTE_STATUS_ID
> > >
> > > column not found
> > > I checked the sql generated by getvaluelist, it is correct,
> > > it just doesn't find the column :(
> > >
> > > --- In firebird-support@yahoogroups.com
> <mailto:firebird-support%40yahoogroups.com> , "davidalbiston"
> > > wrote:('DISPLAYNAME_E').AsString,grid,col,Filter,bCreateFilter);
> > > >
> > > > Do you have a table SKAAP with a column FAMILIE_ID?
> > > >
> > > > The SQL statement you provided returns these values and
> GetValueList
> > > > concatenates them and fires SQL to get the data. The SQL
> created by
> > > > GetValueList is of more interest.
> > > >
> > > > --- In firebird-support@yahoogroups.com
> <mailto:firebird-support%40yahoogroups.com> , "ulrickebester"
> > > > <umeinhof@> wrote:
> > > > >
> > > > > > >
> > > > > > >and I use
> > > > > > >
> > > > > > > GetValueList(QGetCard.FieldByName
> > > > > > >('TABLENAME').AsString,QGetCard.FieldByName
> > > > > > >('DISPLAYFIELD').AsString,QGetCard.FieldByName
> > > > > > >('LOOKUPTABLE').AsString,QGetCard.FieldByName
> > > > > > >('LOOKUPFIELD').AsString,QGetCard.FieldByName
> > > > > > >('IDFIELD').AsString,QGetCard.FieldByName
> > > > > > >('IDVALUE').AsString,QGetCard.FieldByName
> > > > > > >
> > > > > > >
> > > > > > >to get the data
> > > > > > >
> > > >
> > >
> >
>