Subject Re: [IBO] SetRange Broken
Author Jason Wharton
I have the fix for it already:

I have a fix for the SetRange. I shifted some things out of the InternalOpen
method into the AfterPrepare of the internal dataset. What I forgot was I
needed to distinguish between a first prepare and a re-prepare.

Let me rephrase...
Some of the items in the InternalOpen method only need to be figured out
when the dataset is first prepared instead of over and over if the dataset
is opened and closed. So, in an effort to make the opening and closing of a
TIBODataset component I put it where it would be calculated upon preparing
it. I now just need to distinguish between an original prepare and a
re-prepare.

Here's what you can do in your sources to patch this:

In IBODataset.pas line 7067.

procedure TIBOInternalDataset.SysAfterPrepare;
begin
inherited SysAfterPrepare;
{Begin added code}
if not RepreparingSQL then
begin
{ End added code }
IBODataset.BookmarkSize := KeyFields.BufferLength * 2;
IBODataset.FRecordSize := Fields.BufferLength;
IBODataset.FreeKeyBuffers;
if FieldCount > 0 then
begin
IBODataset.InternalInitFieldDefs;
IBODataset.AllocKeyBuffers;
end;
{ Begin added code }
end;
{ End added code }
{$IFDEF IBO_VCL40_OR_GREATER}
IBODataset.SysUpdateParams;
IBODataset.InternalInitParamDefs;
{$ENDIF}
IBODataset.DoAfterPrepare;
end;

There may have been some other minor rearrangements but this is what it
needs to be.

Regards,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Sandeep" <sandeep@...>
To: <IBObjects@yahoogroups.com>
Sent: Sunday, December 02, 2001 5:13 PM
Subject: [IBO] SetRange Broken


> Setrange is not working in latest version of IBO (4.2FK).
> I looked at the Monitor and RBEG_fieldA and REND_fieldA values
> are not set.
>
> Regards
>
>
>
> Sandeep
>
> Software Developer
> CFL
> sandeep@...
> http://www.cfl.co.nz
>
>
>
>
___________________________________________________________________________
> 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/
>
>
>