Home > Archive > Programming with dBASE > March 2006 > Bookmarking question ...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Bookmarking question ...
Ken R.

2006-03-21, 3:25 am

Hi all,

I develop in dbase Plus 2.6.
How do you use bookmark() correctly??
for instance:
*I have query named Assign1 attached to my form.
*when I
? form.Assign1.rowset.bookmark()
*it returns
"BookMark". What am I doing wrong??!!

thanks a bunch in advance.

Ken R.


Michael Nuwer [dBVIPS]

2006-03-21, 3:25 am

Ken R. wrote:
> Hi all,
>
> I develop in dbase Plus 2.6.
> How do you use bookmark() correctly??
> for instance:
> *I have query named Assign1 attached to my form.
> *when I
> ? form.Assign1.rowset.bookmark()
> *it returns
> "BookMark". What am I doing wrong??!!


Well you're not doing anything wrong. But you might be expecting
behavior that is not intended by the software. The following should work:

bk = form.Assign1.rowset.bookmark()
form.Assign1.rowset.next(3)
form.Assign1.rowset.goto(bk)
Ken R.

2006-03-21, 3:25 am

You're right Mike. I was expecting a numeric return like I used to get with
RECNO(). Did it your way and it worked great.

thanks a bunch ...

Ken R.


Ken Mayer [dBVIPS]

2006-03-21, 11:24 am

Ken R. wrote:
> Hi all,
>
> I develop in dbase Plus 2.6.
> How do you use bookmark() correctly??
> for instance:
> *I have query named Assign1 attached to my form.
> *when I
> ? form.Assign1.rowset.bookmark()
> *it returns
> "BookMark". What am I doing wrong??!!


As I'm sure others have stated, the bookMark is a special value -- it's
an internal marker that only means something to the bookMark() and
goto() methods of the rowset.

The only real use for this is to bookmark a row in the rowset, do some
searching in the table, and return to the previous row ...

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
Paul Van House

2006-03-21, 11:24 am

In article <fwlkuGKTGHA.2016@news-server>, krogge@whitemountain
tech.com
says...
> You're right Mike. I was expecting a numeric return like I used to get with
> RECNO(). Did it your way and it worked great.
>



Keep in mind that if you change index key (rowset.Indexname) your saved
bookmark will not work. See OLH.

--
Paul Van House
remove ".removeme" for e-mail replies
Radio/TV Software and Baseball Stat Software:
http://www.binxsoftware.com
Family Home Page: http://vanhouse.binxsoftware.com
Church Home Page: http://www.ashfordumc.org
Andrew Shimmin

2006-03-21, 8:24 pm

I thought it would activate the index that was in effect when the bookmark was created. The OLH states:

When you goto( ) a bookmark, the index that was in effect when the bookmark was returned is automatically activated.

regards, andrew

Paul Van House wrote:
> In article <fwlkuGKTGHA.2016@news-server>, krogge@whitemountain
tech.com
> says...
>
>
>
>
> Keep in mind that if you change index key (rowset.Indexname) your saved
> bookmark will not work. See OLH.
>

Ken Mayer [dBVIPS]

2006-03-22, 9:23 am

Andrew Shimmin wrote:
> I thought it would activate the index that was in effect when the
> bookmark was created. The OLH states:
>
> When you goto( ) a bookmark, the index that was in effect when the
> bookmark was returned is automatically activated.


That's a confusing statement, but it doesn't activate an index. If the
bookmark in was for one index, and you changed the indexName property of
the rowset, the bookmark is not useful anymore ...

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
Andrew Shimmin

2006-03-24, 3:24 am

Well ... not everything is as it appears ... run the attached turnkey.

I have a very large application that is dependent on the bookmark activating the index at the time of the bookmark. If it did not my application would not work ... and it works, so I did some investigation.

I discovered the rowset.goto(bookmark) does activate the bookmark index BUT the rowset.indexName property does NOT get changed to the bookmark activated index.

regards, andrew

Ken Mayer [dBVIPS] wrote:
> Andrew Shimmin wrote:
>
> That's a confusing statement, but it doesn't activate an index. If the
> bookmark in was for one index, and you changed the indexName property of
> the rowset, the bookmark is not useful anymore ...
>
> Ken
>


Ken Mayer [dBVIPS]

2006-03-24, 9:24 am

Andrew Shimmin wrote:
> Well ... not everything is as it appears ... run the attached turnkey.
>
> I have a very large application that is dependent on the bookmark
> activating the index at the time of the bookmark. If it did not my
> application would not work ... and it works, so I did some investigation.
>
> I discovered the rowset.goto(bookmark) does activate the bookmark index
> BUT the rowset.indexName property does NOT get changed to the bookmark
> activated index.


Curious. That could get a little weird, but interesting.

Thanks.

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com