Subject Re: [IBO] Locate key value AfterOpen
Author Jason Wharton
I'm not really sure. It sounds to me like moving the record pointer in the
AfterOpen event is problematic.
I could try and look at this from the perspective of it being a current
limitation of IBO I need to correct.
But, to do this I will need a simple sample application. Can you isolate
this?

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

-- We may not have it all together --
-- But together we have it all --


----- Original Message -----
From: "Alan McDonald" <alan@...>
To: <IBObjects@yahoogroups.com>
Sent: Tuesday, January 28, 2003 10:28 PM
Subject: RE: [IBO] Locate key value AfterOpen


> Jason,
> If I put
> IB_Query1.Bookmark := qbmBlock;
> in the IB_Query1 AfterOpen event (after storing the bookmark ro qbmBlock
> previously)
> and I have put the md.show call in the BeforePrepare event, then when the
> query is opened, I can see the query statement as
> SELECT FIELD1
> , FIELD2
> , ETC
> WHERE PRIMARYKEY=?
> where ?value is the bookmark.
> Now when the form comes up, the grid is populated with only one row, the
> bookmarked row.
> Of course, an SQL statement like this is only going to bring back one
record
> but I am confused as to how setting the bookmark causes WHERE clause to be
> inserted. I thought that setting a bookmark would do a seek on the already
> opened query.
>
> How do I set it up, such that the bookmark assignment does not confine the
> query to one record?
>
> thanks
> Alan
>
> -----Original Message-----
> From: Jason Wharton [mailto:jwharton@...]
> Sent: Wednesday, 29 January 2003 8:38 AM
> To: IBObjects@yahoogroups.com
> Subject: Re: [IBO] Locate key value AfterOpen
>
>
> Not sure why there would only be one record.
> Seems more details are needed.
>
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
> -- We may not have it all together --
> -- But together we have it all --
>
>
> ----- Original Message -----
> From: "Alan McDonald" <alan@...>
> To: <IBObjects@yahoogroups.com>
> Sent: Monday, January 27, 2003 10:30 PM
> Subject: [IBO] Locate key value AfterOpen
>
>
> > I've been trying to get my methodology correct for this for quite some
> > time - I seem to have come up against a brick wall.
> >
> > I've got an IB_ dataset working well in a IB_ grid. I can sort etc fine.
> But
> > I want to "locate" my users on the last record (keyvalue) they were on
> (when
> > exiting the application) each time they start the application again.
> >
> > I'm using the POS=0 syntax in the OrderingLinks.
> >
> > Without the POS=0 clause and using the
> > IB_Query1.KeyFields.Values['BNO'] := irLastBlock; // registry integer
> > IB_Query1.LookupKeyForFields;
> > I locate the record in question without trouble but it seems (is) slow
to
> > get there.
> >
> > With the POS=0 clause, it is faster but the grid is left with only one
> > record in it ( the record in question) and no apparent way to get all
> > records visible (loaded).
> >
> >
> > Does anyone have an idea as to what I'm missing?
> > thanks
> > Alan