Subject Re: [IBO] 4.3: Little problems with IBOQuery params
Author paulfilmer
If anyone is interested I solved the problem with boolean parameters
on TIBOQuery. There is a slight problem with TParam class in DB.Pas,
where if you do a:
TParam.AsBoolean := True
then it changes the TParam datatype to ftBoolean, regardless of what
the actual underlying datatype is in the database. In my case the
booleans are stored as CHAR(1), not integers.

To fix it we need to be a bit more careful when copying the TParam
structure values across to TIB_Column, in the
TIBODataSet.AssignParamValueToCol() routine in IBODataset.pas.

I have emailed Jason this and hopefully it will be included on the
next release. If anyone is having the same trouble you can try my
solution:
IBODataset.pas
procedure TIBODataSet.AssignParamValueToCol()
change the case statement to:

ftBoolean:
If ((ACol.SQLType = SQL_TEXT) or (ACol.SQLType = SQL_TEXT_)) then
begin
If (ACol.IsNull or (ACol.AsBoolean <> AParam.AsBoolean))
then
begin
If AParam.AsBoolean = True then
ACol.AsString := BoolTrueChr
else
ACol.AsString := BoolFalseChr;
end;
end else if ACol.IsNull or ( ACol.AsSmallint <> AParam.AsSmallInt )
then
ACol.AsSmallint := AParam.AsSmallInt;
ftSmallint, ftWord:
ACol.AsSmallint := AParam.AsSmallInt;