Currently, LibreOffice allocates (in ODBC connections) a buffer of size 20 for bookmarks. This usually suffices, but there is no guarantee that it does.
The size is set in connectivity/source/drivers/odbcbase/OResultSet.cxx:
const SQLLEN nMaxBookmarkLen = 20;
This should be changed to querying the maximal size at runtime with SQLColAttribute (called on column 0), and that's the size of the buffer we need.
Hopefully this will not trigger bugs in ODBC drivers... Maybe we should take the biggest of the value returned by SQLColAttribute and the current 20?
Do you know a driver which uses longer bookmarks? Perhaps a free driver?
(In reply to comment #1)
> Do you know a driver which uses longer bookmarks?
No, I don't.
Adding self to CC if not already on
Migrating Whiteboard tags to Keywords: (easyHack, difficultyInteresting, skillCpp, skillSql)
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC)
Can you specify how to create these ODBC connections and how to view/create the bookmarks?
(In reply to Matt K from comment #6)
> Can you specify how to create these ODBC connections
Create an ODBC data source (OS specific; windows: launch ODBC administrator; GNU/Linux: edit ~/.odbc.ini or use some GUI tool to do that)
(or from a running LibreOffice, menu file / new / database)
connect to an existing database
choose "ODBC" in the drop-down box
enter a valid ODBC data source configured on the system
> and how to view/create the bookmarks?
They are not exposed in the UI; they are a feature of the programming API. Insofar as LibreOffice code itself uses ODBC bookmarks, this would also cause gui-user-visible bugs when operating on an ODBC source that makes bookmarks longer than 20 bytes.
open a result set (programmatically execute a query returning results)
stick in a variable, named e.g. rs
then something like:
This FAQ entry is helpful: https://wiki.documentfoundation.org/Faq/Base/021