-
I have a stored procedure in SQL Server that returns a recordset.
In VB, I have an ADO command that executes the stored procedure to retrieve the recordset.
So far, so good.
The problem is that the recordset is Cursor Type 'adOpenForwardOnly'.
I want anything other than a 'forward only' recordset (like static or something) but I can't change it.
Any ideas? :confused:
-
Set adoSellLotsRS = New Recordset
With adoSellLotsRS
.ActiveConnection = gConn
.LockType = adOpenDynamic
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.Source = "Exec sp_GetLots " & iTradeId
.Open
End With
This works for me. Whay ndoesn't it work for you?
Any error messages?
-
adOpenStatic opens a Server Side cursor!
Simon,
It may be that the sp itself has a forward only cursor.
Have you got the code for that?
Cheers,
P.
-
Well...
PaulW, As mentioned in another thread, I have found the solution.
Infact, it is very similar to FMCAR10's solution. :)