Access2Base Error Current Record out of Range

Discussions about using 3rd party extension with OpenOffice.org
Post Reply
Richard52
Posts: 2
Joined: Sat Apr 18, 2015 11:15 pm

Access2Base Error Current Record out of Range

Post by Richard52 »

I have found an issue in Access2Base. When stepping through a Recordset and reach EOF, if you then do a MoveFirst or MovePrevious, the property _EOF remains True even though EOF is correctly set to false, so the next MoveNext fails with the error 1539 Current Record out of Range. I can see the Absolute record is correct (either 1 or last) and in debug it errors because of the _EOF remains True. Hope you can issue a patch or suggest a workaround.

Thanks
Richard
LibreOffice 4.4.2.2 Windows 7 Home Premium SP1
JPL
Volunteer
Posts: 132
Joined: Fri Mar 30, 2012 3:14 pm

Re: Access2Base Error Current Record out of Range

Post by JPL »

Hi Richard,

Indeed I must confess a bug there.

I will issue a patch but probably not before LibreOffice 4.4.5 and LibreOffice 5.0 (seems to be the next version after 4.4).

An easy workaround is to set the _EOF property in your own code:

Code: Select all

Dim orsMyRS As Object
Set orsMyRS = CurrentDb.OpenRecordset(...)
orsMyRS.MoveFirst
orsMyRS._EOF = False
Not that nice but should be compatible with a later patch even if the statement remains in your code after the patch release.

Hope this will help and thanks for making this piece of software even better.
JPL
Kubuntu 22.04 / LibO 24.2
Access2Base (LibO).
BaseDocumenter extension (LibO)
ScriptForge (LibO)
Documentation on https://help.libreoffice.org/latest/en- ... bPAR=BASIC
Richard52
Posts: 2
Joined: Sat Apr 18, 2015 11:15 pm

Re: Access2Base Error Current Record out of Range

Post by Richard52 »

Thanks for your quick response. I will use a workaround for now, but look foward to your improved code.

Your development was very useful and good addition to Open Office. So thanks for developing it.

Rgds
Richard
LibreOffice 4.4.2.2 Windows 7 Home Premium SP1
Post Reply