Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / January 2006

Tip: Looking for answers? Try searching our database.

Error 3021 EOF or BOF or deleted...Solving it in a stylish way

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Atlas - 27 Jan 2006 19:20 GMT
Digging around I've read that the problem can arise on large recordsets at
server's cursorlocation.
Nevertheless even if treating a client cursor the problem still arised.

So I had to manually code a loop statement until the recordset's clone is
fully loaded....UGLY!

Any better hint???

Heres' the code

Dim rs As New ADODB.Recordset

       rs.CursorLocation = adUseClient
       rs.CursorType = adOpenStatic
       Set rs = Me.RecordsetClone

      Do While Me.Recordset.RecordCount <> rs.RecordCount
      Loop

      rs.Find "[ID Giornale] = " & globalIDgoto

      'without the do loop statement, EOF is rised.....

      If Not rs.EOF Then
           Me.Bookmark = rs.Bookmark
       End If

giorgio rancati - 27 Jan 2006 20:42 GMT
Hi Atlas,

I would do this
----
Dim Rs As New ADODB.Recordset
   Set Rs = Me.Recordset.Clone

   Do While Rs.State <> 1
   Loop

   Rs.Find "[ID Giornale] = " & globalIDgoto, 0, 1, 1

   If Not Rs.EOF Then
      Me.Bookmark = Rs.Bookmark
   End If

   Set Rs = Nothing
----

----
ObjectStateEnum
http://msdn.microsoft.com/library/en-us/ado270/htm/mdcstobjectstateenum.asp?fram
e=true

----

bye
Signature

Giorgio Rancati
[Office Access MVP]

> Digging around I've read that the problem can arise on large recordsets at
> server's cursorlocation.
[quoted text clipped - 23 lines]
>             Me.Bookmark = rs.Bookmark
>         End If
Atlas - 27 Jan 2006 22:03 GMT
> Hi Atlas,
>
[quoted text clipped - 19 lines]
> http://msdn.microsoft.com/library/en-us/ado270/htm/mdcstobjectstateenum.asp?fram
e=true

> ----

Ciao Giorgio,
thanks for answering.... can you explain this beheaviour ?
giorgio rancati - 28 Jan 2006 20:49 GMT
> Ciao Giorgio,
> thanks for answering.... can you explain this beheaviour ?

Hi Atlas,

When a form is opened the server starts transmitting it the data. In this
first operation the Recordset.State is set to 9  ( 8 + 1 look at
ObjectStateEnum). When the form receives all data the Recordset.State is set
to 1.
The statement
----
Do While Rs.State <> 1
   Loop
----
it monitors that all data arrived.

I hope I have explained :-)

Ciao
Signature

Giorgio Rancati
[Office Access MVP]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.