Subject Re: [IBO] Problems porting app from 3.6Cf to 4.0 GOLD A
Author Jason Wharton
This sounds to me like a problem with IBO being able to figure out how to
deliver the query live.
Rather than getting rid of the join, try assigning your own EditSQL and see
if that helps resolve it too.

Thanks,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: <gjuncu@...>
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, June 27, 2001 6:17 AM
Subject: Re: [IBO] Problems porting app from 3.6Cf to 4.0 GOLD A


> Hi Jason,
>
> I investigate the Company sample, as you suggested, an it works ok as
> is, but I have found the case when it fails. I still use my example,
> since it is more simple than "Company":
>
> If Clients_Qry from my sample is without JOINS, everything works ok:
> ---Begin SQL--------------
> select * from CLIENTS
> ---End SQL----------------
>
> If Clients_Qry is as in COMPANY sample:
> ---Begin SQL--------------
> select
> CLIENTS.*,
> (select
> COUNTRIES.NAME
> from
> COUNTRIES
> where
> COUNTRIES.ID = CLIENTS.COUNTRY_ID
> ) as COUNTRY_NAME,
> (select
> CITIES.NAME
> from
> CITIES
> where
> CITIES.ID = CLIENTS.CITY_ID
> ) as CITY_NAME
> from
> CLIENTS
> ---End SQL----------------
>
> everything is OK.
>
> But for
>
> ---Begin SQL--------------
> select
> CLIENTS.*,
> CONTRIES.NAME COUNTRY_NAME,
> CITIES.NAME CITY_NAME
> from
> CLIENTS left join COUNTRIES
> on CLIENTS.COUNTRY_ID = CONTRIES.ID
> left join CITIES
> on CLIENTS.CITY_ID = CITIES.ID
> ---End SQL----------------
>
> or
>
> ---Begin SQL--------------
> select
> CLIENTS.*,
> CONTRIES.NAME COUNTRY_NAME,
> CITIES.NAME CITY_NAME
> from
> CLIENTS,
> COUNTRIES,
> CLIENTS
> where
> CLIENTS.COUNTRY_ID = CONTRIES.ID and
> CLIENTS.CITY_ID = CITIES.ID
> ---End SQL----------------
>
> it doesn't work and I get the error explained in my previous message.
>
> HTH,
> Gabriel
>
> --- In IBObjects@y..., "Jason Wharton" <jwharton@i...> wrote:
> > This sounds like a bug to me.
> > Will you take a look at the Company sample application and see if
> you can
> > get it to do the same problem?
> >
> > Thanks,
> > Jason Wharton
> > CPS - Mesa AZ
> > http://www.ibobjects.com
> >
> >
> > ----- Original Message -----
> > From: "Gabriel Juncu" <gjuncu@c...>
> > To: <IBObjects@y...>
> > Sent: Wednesday, June 27, 2001 2:31 AM
> > Subject: [IBO] Problems porting app from 3.6Cf to 4.0 GOLD A
> >
> >
> > > Hi list!
> > >
> > > I have a problem porting my app. from IBO 3.6Cf to 4.0 Gold A.
> > > First the environment:
> > >
> > > 3 Tables:
> > >
> > > CLIENTS
> > > ID numeric(18,0) - primary key
> > > COUNTRY_ID numeric(18, 0)
> > > CITY_ID numeric (18, 0)
> > >
> > > COUNTRIES
> > > ID numeric(18,0) - primary key
> > > NAME varchar(50)
> > >
> > > CITIES
> > > ID numeric(18,0) - primary key
> > > NAME varchar(50)
> > > COUNTRY_ID numeric(18, 0)
> > >
> > > and 3 TIB_Querys:
> > >
> > > Clients_Qry:
> > > SQL: select * from CLIENTS
> > > KeyLinks: ID
> > > KeyLinksAutoDefine: FALSE
> > >
> > > Countries_Qry:
> > > SQL: select * from COUNTRIES
> > > KeyLinks: COUNTRIES.ID = COUNTRY_ID
> > > KeySource: Clients_Src
> > > KeyLinksAutoDefine: FALSE
> > >
> > > Cities_Qry:
> > > SQL: select * from CITIES
> > > KeyLinks: CITIES.ID = CITY_ID
> > > KeySource: Clients_Src
> > > MasterLinks: CITIES.COUNTRY_ID = COUNTRIES.ID
> > > MasterSource: Countries_Src
> > >
> > > In Form.Create:
> > > Countries_Qry.Open;
> > > Cities_Qry.Open;
> > > Clients_Qry.Open;
> > >
> > > What I wanted is that when a user inserts a new client and
> chooses one
> > > country in Country_LookupCombo, only cities from that country
> would be
> > > available in Cities_LookupCombo. And it worked ok in IBO 3.6Cf.
> > > Now in IBO 4.0 Gold A I get 2 "Dataset can not scroll" errors
> when opening
> > > the Client_Qry. If I first open Clients_Qry, then the error does
> not
> > appear
> > > when I create the form, but whei I scroll the query in IB_Grid.
> > > If I set Cities_Qry.MasterSource := nil, everything is ok, except
> of
> > course
> > > that the cities are not filtered anymore.
> > > Question:
> > > Is this a normal behaviour, or is a bug? If it's normal, than
> probably I
> > > have to filter the cities query in OnChange event of
> > Countries_LookupCombo.
> > >
> > > Thank you,
> > > Gabriel
> > >
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>