bBrowser: Either EOF or BOF is true or current record has been deleted
Posted: Wed Mar 15, 2023 2:34 am
Hi All,
We have been getting the above exception from xs2ado in various places in our application. After some digging around we found it was happening when bBrowser was filling a screen grid with data, but only if the data did not fill the display area and require a vertical scroll bar. The actual call that was triggering the problem, when it happened, was a Skip call to reposition a recordset at line 715 in file bBrowser (Control).prg After more playing it only seemed to happen when the number of rows to skip was zero.
It seemed to me that skipping zero rows should be effectively a "do nothing" operation but it seemed be causing this problem for us. Without fully understanding why the code might generate a skip for zero rows, or if there might be side effects, I decided to adjust the code to not call the Skip if the skip count was zero and see if that broke anything. The if condition in the code clearly implies that skipping zero rows might happen.
Here is a bit of the code with my change:
// Prüfen, ob Datensatzgruppen berücksichtigt werden müssen
if !self:ExistRecordGroups() .or. uRecCount = 0
// Datensatzgruppen existieren nicht
lSuccess := iif(uRecCount == 0, TRUE, self:oServer:Skip(uRecCount)) // JCB
elseif uRecCount < 0
// Unter Berücksichtigung von Datensatzgruppen in Richtung Dateianfang skippen
I have marked the line I changed, which was line 715 in the code we have, with my initials. I just made the call to the Skip method conditional so it is not called when the skip count is zero.
This seems to have fixed the problem for us, so I thought I should report it in case it helps someone else.
Best Regards,
John
We have been getting the above exception from xs2ado in various places in our application. After some digging around we found it was happening when bBrowser was filling a screen grid with data, but only if the data did not fill the display area and require a vertical scroll bar. The actual call that was triggering the problem, when it happened, was a Skip call to reposition a recordset at line 715 in file bBrowser (Control).prg After more playing it only seemed to happen when the number of rows to skip was zero.
It seemed to me that skipping zero rows should be effectively a "do nothing" operation but it seemed be causing this problem for us. Without fully understanding why the code might generate a skip for zero rows, or if there might be side effects, I decided to adjust the code to not call the Skip if the skip count was zero and see if that broke anything. The if condition in the code clearly implies that skipping zero rows might happen.
Here is a bit of the code with my change:
// Prüfen, ob Datensatzgruppen berücksichtigt werden müssen
if !self:ExistRecordGroups() .or. uRecCount = 0
// Datensatzgruppen existieren nicht
lSuccess := iif(uRecCount == 0, TRUE, self:oServer:Skip(uRecCount)) // JCB
elseif uRecCount < 0
// Unter Berücksichtigung von Datensatzgruppen in Richtung Dateianfang skippen
I have marked the line I changed, which was line 715 in the code we have, with my initials. I just made the call to the Skip method conditional so it is not called when the skip count is zero.
This seems to have fixed the problem for us, so I thought I should report it in case it helps someone else.
Best Regards,
John