Subject Re: Interbase to Firebird conversion, Delphi
Author ulrickebester
--- In firebird-support@yahoogroups.com, "ulrickebester"
<umeinhof@...> wrote:
>
> --- In firebird-support@yahoogroups.com, Helen Borrie <helebor@>
> wrote:
> >
> > At 07:51 PM 3/11/2008, you wrote:
> > >If anyone has done any Interbase to Firebird conversions, here
is
> a
> > >question for you..please help!
> > >
> > >I converted from Interbase 6 to Firebird Embedded
> > >I kept the original ibx components and everything seemed to work
> fine
> > >until I got
> > >
> > >Dynamic SQL Error
> > >
> > >SQL error code = -206
> > >
> > >Column unknown
> > >
> > >SKAAP.FAMILIE_ID
> > >
> > >At line 1, column 86.
> > >
> > >I get this on a number of queries and it worked fine on
Interbase.
> > >The fields are in the table, I checked the queries too. The
weird
> > >thing is that some fields are found and others not. All in the
> same
> > >table! No quotes were used.
> >
> > The most likely thing is that your problem queries are using a
mix
> of table identifiers and relation aliases to qualify the column
names
> (or some qualified and some not). From Fb 2-forward, this is
> invalid. Use either all table identifiers or all aliases and don't
> omit any.
> >
> > ./heLen
> >
>
> Thanx heLen!
> 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


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..