Hi, I get an error trying to MoveFirst on a Recordset. I've been debugging but I can't figure it out... Here's what I've got:
That code gives me cursor type adForwardOnly and an error at rs.MoveFirst!!?? Cursor location is server side. I know the returned recordset has more than 3 rows...
![[elephant2] [elephant2] [elephant2]](/data/assets/smilies/elephant2.gif)
graabein
Code:
Set cmd = New ADODB.Command
With cmd
.ActiveConnection = myConn
.CommandType = adCmdStoredProc
.CommandText = "usp_GetDayList
'Parameters...
End With
Set rs = New ADODB.Recordset
rs.Open cmd, , adOpenDynamic, adLockReadOnly
If rs.State = adStateOpen Then
Debug.Print "rs.CursorType: " & rs.CursorType
rs.MoveNext
rs.MoveNext
rs.MoveFirst
'Error!!
That code gives me cursor type adForwardOnly and an error at rs.MoveFirst!!?? Cursor location is server side. I know the returned recordset has more than 3 rows...
![[elephant2] [elephant2] [elephant2]](/data/assets/smilies/elephant2.gif)
graabein