Subject RE: [IBO] Params bug in new release 4.3 (fix included here)
Author Marv Cook
Jason,

They look the same to me. :)

Marv

-----Original Message-----
From: Jason Wharton [mailto:jwharton@...]
Sent: Saturday, November 15, 2003 11:35 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] Params bug in new release 4.3 (fix included here)

This is a bug I fixed that got in the new release. I'm about to release
a
patch for it.

Here it is for you in IBODataset.pas around line 6800:

This:
if Assigned( tmpCol ) and ( tmpCol.Row.RowType = rtParam )
then
begin
AssignParamValueToCol( AParams[ii], tmpCol );
tmpParam := FindParam( tmpCol.FullFieldName );
if Assigned( tmpParam ) and
( tmpParam.Value <> AParams[ii].Value ) then
tmpParam.Value := AParams[ii].Value;
end;
end;


should be changed to:
if Assigned( tmpCol ) and ( tmpCol.Row.RowType = rtParam )
then
begin
AssignParamValueToCol( AParams[ii], tmpCol );
tmpParam := FindParam( tmpCol.FullFieldName );
if Assigned( tmpParam ) {and
( tmpParam.Value <> AParams[ii].Value )} then
tmpParam.Value := AParams[ii].Value;
end;
end;

It was designed to keep the native param value and the TDataset TParams
values the same. It is possible to get an invalid variant exception when
comparing them if one of them is Unassigned. The compare was intended to
avoid making an assignment if they were the same values, but it appears
there isn't much done as a result of the assignment in the way of events
so
this code can simply be removed.

Thanks,
Jason Wharton



________________________________________________________________________
___
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/