Subject Re: [IBO] Bug Report
Author Jason Wharton
Dalton,

Have you traced the list of parameters to see which ones it does have? Are
you using Dialect 3?

Would you supply me with the CREATE TABLE statements necessary to duplicate
this exactly?

PS. Convey my regards to David Z.

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


----- Original Message -----
From: "Dalton Calford" <dcalford@...>
To: <IBObjects@egroups.com>
Sent: Thursday, January 11, 2001 11:55 AM
Subject: [IBO] Bug Report


> Hi All,
>
> I believe that DavidZ has found a bug in the BDE compatibility layer
> within IBO.
>
>
> TIBOQuery complains with "Parameter '' not found.'
> or an access violation occurs when we try the following query:
>
> --------------------------------------------------------
> select
> a.billingid,
> a.activation_date,
> a.service_account,
> cast(null as date) acdate2
> from
> billid A
> where
> a.account = :account
> and
> activation_date <= :acdate
> and
> aliasbillid is null
> union
> select
> b.billingid,
> b.activation_date,
> b.service_account,
> b.activation_date acdate2
> from
> billid_history B
> where
> b.account=:account
> and
> b.aliasbillid is null
> and
> not exists
> (select 1
> from billid d
> where d.billingid = b.billingid
> and d.activation_date <= :acdate)
> and
> b.activation_date =
> (select max(c.activation_date)
> from billid_history C
> where c.billingid = b.billingid
> and c.activation_date <= :acdate)
>
> -----------------------------------------------------------
>
> The BDE TQuery component has no problem with the query and TIB_Query
> works properly with it as well. (Even the IBO sql editor works fine with
> the above query)
>
> For some reason TIBOQuery can not handle it properly.
>
>
> To further pinpoint the problem, the following query
>
> ------------------------------------------
> select a.billingid, a.activation_date, a.service_account,
> cast(null as date) acdate2 from billid A
> where a.account = :account
> and activation_date <= :acdate
> and aliasbillid is null
> union
> select b.billingid, b.activation_date, b.service_account,
> b.activation_date acdate2
> from billid_history B
> where b.account=:account
> and b.aliasbillid is null
> and not exists (select 1 from billid d
> where d.billingid = b.billingid
> and d.activation_date <= '01/01/2000')
> and
> b.activation_date = (select max(c.activation_date) from
> billid_history C
> where c.billingid = b.billingid and c.activation_date
> <='01/01/2000')
> ------------------------------------------
>
> works, but if you replace either instance of '01/01/2000' with a
> parameter, the problem occurs.
>
>
> We are using IBO 3.6 Cc under Delphi 5
>
> We have developed a work around for our application (by directly
> changing the sql properties at run time) but we are under the gun for
> time so we have not had a chance to fix it directly.
>
> Hope this is enough information to track it down.
>
> best regards
>
> Dalton
>
>
>