Subject Re: [IBO] TIBOQUERY Problem
Author Jason Wharton
An actual complete and integrated IBO solution is going to look more like
this.
Still working on it, but one thing I want to be sure of is that this code is
able to handle getting interrupted by an action taken during a callback.

function TIB_BDataset.SeekKeyForBufferFields(
var ANodeRef: TIB_NodeRef ):
boolean;
var
tmpCursorGen: integer;
begin
Result := NodeList.LookupBufferNode( KeyFields.OldBuffer );
if not Result and
not CursorIsKeyFields and
not KeyLinksExist then
begin
tmpCursorGen := FCursorGen;
BeginCallbackFetching;
try
while not Result and BufferActive and
( not BufferHasBof or not BufferHasEof ) and
( FCursorGen = tmpCursorGen ) do
begin
if not BufferHasBof then
ValidateRows( BofRowNum - 500, BofRowNum );
if not BufferHasEof then
ValidateRows( EofRowNum, EofRowNum + 500 );
Result := NodeList.LookupBufferNode( KeyFields.OldBuffer );
end;
finally
EndCallbackFetching;
end;
end;
if Result then
begin
ANodeRef := NodeList.BufRef;
if ( ANodeRef.Pos > NodeList.BofRef.Pos ) then
begin
if NodeList.FilterDel then
if rfDeleted in NodeList.BufRef.Node.RowFlags then
ANodeRef.Pos := NodeList.BofRef.Pos;
if NodeList.Filtered then
if rfFiltered in NodeList.BufRef.Node.RowFlags then
ANodeRef.Pos := NodeList.BofRef.Pos;
end;
if ANodeRef.Pos <> NodeList.BofRef.Pos then
begin
if KeyLinksExist or Assigned( NodeList.BufRef.Node.RecordData ) then
FBufferCursor.QuickFetch( NodeList.BufRef.Node, false, false );
Result := ANodeRef.Pos > NodeList.BofRef.Pos;
end;
end
else
ANodeRef := InvalidNodeRef;
end;

Please put this implementation in your sources and let me know if this makes
it operate more efficiently for you even if you don't have proper KeyLinks
assigned.

But, I am still convinced the most desirable solution for you will be to
provide proper KeyLinks settings.

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


----- Original Message -----
From: "Andy Murphy" <andy@...>
Newsgroups: egroups.ibobjects
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, November 28, 2001 5:19 PM
Subject: Re: [IBO] TIBOQUERY Problem


> Ok,
>
> I followed your instructions when it did this hang up and the break point
> was:
>
> asm fldcw [SaveCW] end;
>
> and the callstack had:
>
> TIB_Dataset.SysFetchNext
> TIB_Dataset.SysFetchAll(???)
> TIB_Dataset.FetchAll
> TIB_BDataset.SeekKeyForBufferFields(($5FFD64, 0, 19375052, 13991936, 0))
> TIB_BDataset.LookupKeyForBufferFields
> TIB_BDataset.SetBufferBookmark(???)
> TIBODataset.CompareBookmarks($127A394,$127C88C)
> TCustomdxDBTreeListControl.CompareBkm(???,???)
> AssignNode(???)
> TCustomdxDBGrid.GetNextNodes(lmCurrent,rmNone,False)
> TCustomdxDBGrid.LoadGroupList(nil)
> TCustomdxDBGrid.ReLoadGroupList
> TCustomdxDBGrid.LinkActive(???)
>
TCustomdxDBGrid.SetOptionsDB([edgoCancelOnExit,edgoPartialLoad,edgoUseBookma
> rks])
> TForm1.doopenlist
> TForm1.dxDBTreeList1KeyDown(???,???,[])
> TCustomdxDBTreeList.KeyDown(13,[])
>
> Thanks.
>
>
>
>
___________________________________________________________________________
> 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/
>
>
>