Subject Re: Interbase to Firebird conversion, Delphi
Author ulrickebester
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...>
wrote:
>
> At 10:55 PM 3/11/2008, you wrote:
>
> >> > >Dynamic SQL Error
> >> > >
> >> > >SQL error code = -206
> >> > >
> >> > >Column unknown
> >> > >
> >> > >SKAAP.FAMILIE_ID
> >> > >
> >> > >At line 1, column 86.
> >> > >
> >
> >> I checked quickly, but there aren't any aliases. Could I provide
> >the
> >> code that I'm using, maybe you see something I don't?
> >>:
> >
> >qgetcards:
> >select
> > KAART_DETAIL.KAART_DETAIL_ID,
> > cardfields.displayname_a,
> > cardfields.displayname_e,
> > cardfields.displayfield,
> > cardfields.tablename,
> > cardfields.lookuptable,
> > cardfields.lookupfield,
> > KAART_DETAIL.CARD_CAPTION,
> > cardfields.card_group,
> > cardfields.idfield,
> > cardfields.idvalue
> > FROM
> > cardfields,KAART_DETAIL,KAARTE
> > WHERE
> > ((cardfields.cardfields_id = KAART_DETAIL.CARDLOOKUP_ID)
> > AND
> > (KAART_DETAIL.KAARTE_ID = KAARTE.KAARTE_ID)
> > AND
> > (KAARTE.KAARTE_ID = :KAARTE_ID))
> =============================================
> > ORDER BY KAART_DETAIL_ID <--- needs a qualifier
>
> =============================================
>
>
>
> >table cardfields
> >
> >CREATE TABLE CARDFIELDS (
> > CARDFIELDS_ID INTEGER NOT NULL,
> > DISPLAYNAME_E VARCHAR(50) CHARACTER SET NONE,
> > DISPLAYNAME_A VARCHAR(50) CHARACTER SET NONE,
> > DISPLAYFIELD VARCHAR(50) CHARACTER SET NONE,
> > TABLENAME VARCHAR(50) CHARACTER SET NONE,
> > LOOKUPTABLE VARCHAR(50) CHARACTER SET NONE,
> > LOOKUPFIELD VARCHAR(50) CHARACTER SET NONE,
> > IDFIELD VARCHAR(50) CHARACTER SET NONE,
> > IDVALUE VARCHAR(50) CHARACTER SET NONE,
> > CARD_GROUP VARCHAR(50) CHARACTER SET NONE,
> > FIELDTYPE CHAR(1) CHARACTER SET NONE
> >);
> >
> >Kaart Detail:
> >CREATE TABLE KAART_DETAIL (
> > KAART_DETAIL_ID INTEGER NOT NULL,
> > KAARTE_ID INTEGER NOT NULL,
> > CARDLOOKUP_ID INTEGER NOT NULL,
> > CARD_CAPTION VARCHAR(50) CHARACTER SET NONE
> >);
> >
> >Kaarte:
> >CREATE TABLE KAARTE (
> > KAARTE_ID INTEGER NOT NULL,
> > NAAM VARCHAR(20) CHARACTER SET NONE
> >);
> >
> >in which the fields are stored where to extract the data from
> >
> >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
> >('DISPLAYNAME_E').AsString,grid,col,Filter,bCreateFilter);
> >
> >to get the data
> >
> >When I run the sql directly in the sql editor it works fine..
>
> So what is the error you get from this query? Column unknown
KAART_DETAIL_ID ?
>
> ./heLen

I get

Dynamic SQL Error
SQL error code = -206
Column unknown
SKAAP.FAMILIE_ID
At line 1, column 86.

where 'skaap' is a value in the table cardfields, column tablename
and 'familie_id' is a value in column displayfield

(the users set up indices and the lookup values are stored in a
table - cardfields. the actual data is stored in table skaap)

thanks..