MovePrevious causes an error

  • Thread starter Thread starter Lionel Slade
  • Start date Start date
L

Lionel Slade

Hi,

I'm using an ado connection to Oracle (Release 8.1.6.0.0) through VB.Net

When I use a client side cursor (ADODB.CursorLocationEnum.adUseClient)
there's no problem.

But, if I change to a server side cursor
(ADODB.CursorLocationEnum.adUseServer) the recordset move commands work;

recs.MoveFirst - Ok
recs.MoveLast - Ok
recs.MoveNext - Ok

Except for

recs.MovePrevious

Which gives an error ??????

'An unhandled exception of type
'System.Runtime.InteropServices.COMException' occurred in prjReferrals.exe

Additional information: Operation is not allowed in this context.'

Why ??? What's wrong ??? Help !!!
 
try group "microsoft.public.data.ado". This is not an ADO.NET question

Have you checked that the recordset isn't already on the first record? or is
it BOF? I haven't used plain ADO in about a year. MoveFirst always goes to
the first record no matter where the cursor currently is. MovePrevious will
attempt to move back one record, no matter where it is. So if already at
the beginning, you get an error.

COM exceptions (via COM Interop) do not return great error messages. Using
the locals window while debugging you may be able to drill down in the
exception to an actual ADO error message? Have you tried to do that?
 
Back
Top