Access2Base Error Current Record out of Range

Discussions about using 3rd party extension with OpenOffice.org

Access2Base Error Current Record out of Range

Postby Richard52 » Sat Apr 18, 2015 11:41 pm

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
Richard52
 
Posts: 2
Joined: Sat Apr 18, 2015 11:15 pm

Re: Access2Base Error Current Record out of Range

Postby JPL » Sun Apr 19, 2015 11:48 am

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   Expand viewCollapse view
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
Windows 7 / LibO 6.0 / AOO 4.1
Ubuntu 18.04 / LibO 6.1
Access2Base extension (AOO) or standard (LibO).
BaseDocumenter extension (LibO)
Documentation on http://www.access2base.com and http://www.access2base.com/basedocumenter
JPL
Volunteer
 
Posts: 98
Joined: Fri Mar 30, 2012 3:14 pm

Re: Access2Base Error Current Record out of Range

Postby Richard52 » Sun Apr 19, 2015 11:11 pm

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
Richard52
 
Posts: 2
Joined: Sat Apr 18, 2015 11:15 pm


Return to Extensions

Who is online

Users browsing this forum: No registered users and 1 guest