cancel
Showing results for 
Search instead for 
Did you mean: 

Error -2054 Either BOF or EOF have been reached. (What triggers it???)

rasmuswulff_jensen
Active Contributor
0 Kudos
1,558

Hi... I created an addon (DI+UI), but for what that seem quite random I get the following error message:

<b>Either BOF or EOF have been reached.</b>

BOF or EOF is of cause the DI Recordset properties (or bo-browser)

The error seem to be completly random but seems to be linked to when I open a window i SBO (FormLoad item event), but after the error (that doesn't stop the addon) and I try to open the same window the error doent pop up...

I have without success tried some code to force the error but I can't trigger it (Tried making a movenext on an empty recordset and getting from an empty recordset, but none of those gave the correct error)...

Anyone know when this error is triggered, or could it be a bug in the SDK?

Running SDK2005A in C#

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Rasmus,

have you solve this issue?

Former Member
0 Kudos

You can create your own thread if you want to. It seems this post is 10yrs old.

Former Member
0 Kudos

Hi Mah,

I'm not sure how closely the SAP recordset object relates to a DAO recordset but I found I don't get these issues if I check a recordset is not empty before attempting to movefirst(), much like you would with a DAO recordset.

For example, some code from a VB.net app

RS = Company.GetBusinessObject(BoObjectTypes.BoRecordset)

RS.DoQuery("Your query SQL here")

If Not (RS.BoF And RS.EoF) Then

    RS.MoveFirst()

    ....other code

End If

Former Member
0 Kudos

i´m doing...

oRecordSet.MoveFirst();

             if (oRecordSet.BoF)

                    {

                        while (!oRecordSet.EoF)

                        {

                              bla bla...

                            oRecordSetCta.MoveNext();

                        }

                    }

Former Member
0 Kudos

Hello Rasmus,

I have exactly the same problem on opening an own AddOn-form.

The form load process contains several steps where recordsets are used. Recordsets are always asked for RecordCount and/or a loop is opend with "While Not oRs.EOF" before trying to read data from rec.-set.

- occurs randomly with the same data (compiled AddOn at our customer).

- cannot be reproduced in debug mode

- when opening the same form a second time it works without a problem (compiled AddOn at our customer).

Did you find a solution for the problem in the meantime?

Regards,

Roland

Former Member
0 Kudos

...is there really no solution for this problem?

In the meantime the error also has occured in another AddOn-Function where a Recordset is only used for one time and the value is definitely only read from RS when RecordCount = 1.

Former Member
0 Kudos

Hi Roland,

have you found the root caused or fix the error?

i encounter the same issue..

please help

thanks!

Former Member
0 Kudos

You get this error message when a recordset is at the EOF position and you try to access a value from the fields collection.

A simple example reproducing it would be:-

strQuery="select count(*) from OCRD"
sboRecordset.DoQuery strQuery
sboRecordset.MoveLast
sboRecordset.MoveNext 'EOF will now be true
msgbox sboRecordset.Fields(0).Value

John.