Subject Re: [IBO] Converting TQuery to TIBOQuery
Author henry FRANQUET
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
> At 06:45 PM 18/07/2003 +1000, you wrote:
> >I was using the methode ParamByName of a TQuery and it was
returning a
> >TParam, but when I wanted to convert my TQuery to a TIBOQuery, the
> >methode
> >ParamByName returns a TIB_Column which is not compatible (we can't
use
> >ParamType, DataType, Bound,...). So is there a way to convert this
> >TQuery
> >without changing the whole code of my application?
>
> You don't have to change it. TIBOQuery's Params property is a
TParams, just
> as TQuery.
>
> On thing you should understand about the IBO help - it documents
only
> properties and methods that it implements itself, or re-
implements. It
> does not document those of the VCL ancestors.
>
> TIBOQuery does indeed have a Params property that is a TIB_Row - an
array
> of TIB_Column (as the help says) - but this refers to an internal
> TIB_Dataset that is maintained as a class wrapper for TIBOBaseQuery.
>
> Normally, you are not encouraged to access the properties and
methods of
> the InternalDataSet. TIBOQuery publishes all of the internal props
and
> methods that are applicable to it, e.g. KeyLinks, GeneratorLinks,
and so
> on. Just use those of the TQuery as before (use the Delphi help)
and all
> will be well.
>
> Helen

So I don't understand why I have an error with this code:

var
CurrentParam : TParam;
FQuery : TIBOQuery;
Begin
CurrentParam := FQuery.ParamByName('p' + CurrentField.FName);


It retrun this error:
[Error] MyFile.pas(453): Incompatible Types : 'TParam' et 'TIB_Column'

But when I was using a TQuery it was working fine...

So did I do something wrong?

Thanks