Subject Re: [IBO] Integer Field Manipulation
Author Stephen Lee-Woolf
This is driving me nuts! Connecting to Firebird using my normal sql tool
(IBExpert) the query "select cast(pcost as real)/100 from ...." works
exactly as anticipated and returns the results I want.

Using IBO (4.2H) in Delphi 6 Professional to try and return results to a
grid (ie remove QuickReport from the equation) and using several
variants of the query through both iboDatabase/iboQuery and
ib_database/ib_query (both combinations return the same results), I get:

"select cast(pcost as real) / 100 from .... " Fieldname: not found
"select cast('pcost' as real) / 100 from ..." Fieldname: not found
"select cast("pcost" as real) / 100 from ..." SQLError code - 206 Column
unknown pcost.

If I access the database via ODBC the query works fine. To me this all
suggests some problem with IBObjects. I suspect some form of bug because
I have use IBO for some time, and quite extensively, without problems. I
find it hard to believe that there is a problem with my installation.

Any suggestions greatly received. As a temporary fix I shall have to use
ODBC 'cause I really need to get this system live ASAP.

Cheers

In article <3.0.1.32.20020625175144.00ab3470@[158.36.132.22]>,
svein.erling.tysvaer@... says...
> >select (pcost/100) as rcost from .....
> >
> >and this worked, with the value correctly displayed. On the new sytem
> >(using iboDatabase and iboQueries) the same query simply displays the
> >word 'rcost' in the data field. Using select cast(pcost as real)/100 as
> >rcost from ... doesn't work either (claims the field doesn't exist).
>
> Strange - are you sure this doesn't work?
>
> I just tried using IB_SQL with similar queries, and the only trouble I
> found was that unless I cast the field, the result is an integer.
>
> So my guess is that this is either a problem with QuickReport, the TDataset
> Compatible components of IBO (doesn't quite make sense), your particular
> version of IBO or something messy in your installation.
>
> Not much help from me I'm afraid,
> Set
> -former UMIST graduate (1992)
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>

--
Steve Lee-Woolf
University of Salford
Manchester, U.K.