Subject Re: [IBO] problems with SQL query
Author Helen Borrie
At 02:11 PM 30/07/2004 +0000, you wrote:
> > ...
> > Params['ParamName'] is valid in IBO. It resolves to the index
> > number of the Params[] array.
> > ...
> > The exception reported wasn't a compiler error, it was a dataset
> > exception.
>Then something is wrong with my instalation of ibo.
>What I did is:
>1. New application
>2. Drop one TIB_Query and one TIBOQuery on the form
> IB_Query1.Params['xxx'].AsString := '';
> IBOQuery1.Params['xxx'].AsString := '';
>When I try to compile I get 2 errors:
>[Error] Unit1.pas(30): Incompatible types: 'Word' and 'String'
>[Error] Unit1.pas(31): Incompatible types: 'Integer' and 'String'

Oops, sorry, Fields['xxx'] is implemented for the Fields[] array. For
parameters the property is ParamValues, not Params:

IB_Query1.ParamValues['xxx'].AsString := '';
And I *think* you can (and maybe need to) omit the casting method, provided
the input data can be resolved to the correct type, since ParamValues is a
Variant type. Can't verify it myself just at the moment, though.