Subject Re: problems with SQL query
Author Marco Menardi
--- In IBObjects@yahoogroups.com, "Mihai Chezan" <gsmcq@y...> wrote:
> > Oops, sorry, Fields['xxx'] is implemented for the Fields[] array.
> > For parameters the property is ParamValues, not Params:
> same error here:
>
> IB_Query1.Fields['xx'].AsString := '';
> IBOQuery1.Fields['xx'].AsString := '';
>
> [Error] Unit1.pas(29): Incompatible types: 'Word' and 'String'
> [Error] Unit1.pas(30): Incompatible types: 'Integer' and 'String'
>
> like I said it must be something wrong with my ibo instalation or
> version (4.3.Aa).

You have to provide positiona, integer numbers if you want to use
Fields[], like:
IB_Query1.Fields[0].AsString := '';
IBOQuery1.Fields[0].AsString := '';
If you want to provide string "field names", you have FieldByName:
IB_Query1.FieldByName['CUST_NAME'].AsString := '';
IBOQuery1.FieldByName['CUST_NAME'].AsString := '';
(well, I use only the IB_ stuff...)
For parameters, the concept is more or less the same, with Params[x]
and ParamByName['PAR_NAME'].
Maybe having a look at the samples could help a lot.
regards
Marco Menardi