Subject | Re: Interbase to Firebird conversion, Delphi |
---|---|
Author | ulrickebester |
Post date | 2008-11-03T12:45:36Z |
Hi Set :)
That is the only query that is used. The data it selects contains the
fields for the lookup in other tables, including data in table skaap,
field familie_id (which does exist).
I stepped and get the error on
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);
thanks..
--- In firebird-support@yahoogroups.com, Svein Erling Tysvær
<svein.erling.tysvaer@...> wrote:
than table names, and adding alias to the ORDER BY clause (in trying
to prevent ambiguous SQL statements, I think one version of Firebird
may have gone a bit too far and prevented some SQL that weren't
ambiguous - still, I find this better than InterBase which (at least
IB 6.0) tries to guess rather than give an error message).
you run where you specify SKAAP.FAMILIE_ID as one of the columns to
select. Your error message specifically says 'column unknown' so it
is not a 'value' that creates this error - it is complaining that
FAMILIE_ID is not a column in SKAAP or that you have a query where
you refer to SKAAP. FAMILIE_ID without actually including SKAAP in
your select(e.g. SELECT SKAAP.FAMILIE_ID FROM CARDFIELDS)
That is the only query that is used. The data it selects contains the
fields for the lookup in other tables, including data in table skaap,
field familie_id (which does exist).
I stepped and get the error on
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);
thanks..
--- In firebird-support@yahoogroups.com, Svein Erling Tysvær
<svein.erling.tysvaer@...> wrote:
>problem, but a shot in the dark could be to change to:
> I have never used ibx components and have no clue about your
>changing from SQL-89 implicit join to SQL-92, using aliases rather
> 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 karate k on kd.kaarte_id = k.kaarte_id
> where k.kaarte_id = :kaarte_id
> order by kd.kaart_detail_id
>
> The difference between the above select and what you have used, is
than table names, and adding alias to the ORDER BY clause (in trying
to prevent ambiguous SQL statements, I think one version of Firebird
may have gone a bit too far and prevented some SQL that weren't
ambiguous - still, I find this better than InterBase which (at least
IB 6.0) tries to guess rather than give an error message).
>error doesn't come from this query at all, but from whatever query
> Noticing that you've just answered Helen, my guess is that your
you run where you specify SKAAP.FAMILIE_ID as one of the columns to
select. Your error message specifically says 'column unknown' so it
is not a 'value' that creates this error - it is complaining that
FAMILIE_ID is not a column in SKAAP or that you have a query where
you refer to SKAAP. FAMILIE_ID without actually including SKAAP in
your select(e.g. SELECT SKAAP.FAMILIE_ID FROM CARDFIELDS)
>support@yahoogroups.com] On Behalf Of ulrickebester
> HTH,
> Set
>
> -----Original Message-----
> From: firebird-support@yahoogroups.com [mailto:firebird-
> Sent: 3. november 2008 12:56Delphi
> To: firebird-support@yahoogroups.com
> Subject: [firebird-support] Re: Interbase to Firebird conversion,
>work
> --- 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
> > finedon't
> > > >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
> > 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..
>