Form.row vs Form.getBookmark

I found a solution to something I was trying to figure out in an answer given by @ratslinger a few years ago. The code works fine, but I’m curious about 1 line.

sel(0) = oForm.getBookMark()

Rewriting it as

sel(0) = oForm.row

seems to work fine. Is there a difference between the .getBookmark method and the .row property? If someone used Form.row in place of Form.getBookmark, would it trip them up somewhere down the line, or are they really interchangeable?

I have no idea what a bookmark is in the context of a Base form, and its use in Base doesn’t seem to be documented anywhere. Does a bookmark offer something that a row index doesn’t? Or is it just a relic from Writer forms that no one has pruned off yet? The word “bookmark” offers no clues about what it represents.

try opengrok getbookmark in idl

LibreOffice: RowSet Service Reference
LibreOffice: XRowLocate Interface Reference

@fpy OK, it’s a way to return to a specific row, but a row number is a way to return to a specific row. It can be a complex data structure, but in every case I’ve checked, it’s the row number.

BTW, your first link isn’t working.

Thanks for the response. The 2 working links hint at what’s going on with Bookmarks, so I’m not quite as clueless as I was before.

hum. pity. seems you have to restart from https://opengrok.libreoffice.org/

1 Like

some more clues in Bug List :
68675 – ODBC: support arbitrarily-sized bookmarks
156512 – Base don't refresh inserted row when using an updatable XResultSet

Base does not support bookmarks.
Demo:
bookmark.odb (13.7 KB)

1 Like

Thank you @fpy and @Villeroy .I gave you each a like.
When @Ratslinger used frm.getBookmark instead of frm.row, I thought there must be something about Base bookmarks that I didn’t know about. At this point, I’m pretty sure that frm.Bookmark and frm.getBookmark are aliases for frm.row. Even frm.hashBookmark(frm.getBookmark) returns the row number.