Problem with a REF CURSOR and ADO Recorset
EyesJun 10 2004 — edited Jun 10 2004Hi,
I have a function to return a REF CURSOR, in VB winth ADO I have a Recorset for this function (result set)... BUT, I can't MovePrevious on Recordset, why?... the recordset is Dynamic and Set rsResult = command.Execute line's code chage this value for ForwardOnly, why?
I post the code en VB, because Oracle's code is the same for any function with return Rer Cursor type:
Dim cmdComando As New ADODB.Command
Dim pWhere As New ADODB.Parameter
Dim rsResult As New ADODB.Recordset
Set pWhere = cmdComando.CreateParameter("pWhere", adBSTR, adParamInput, , CStr(astrWhere))
cmdComando.ActiveConnection = Oracon
cmdComando.Properties("PLSQLRSet") = True
cmdComando.Parameters.Append pWhere
cmdComando.CommandType = adCmdStoredProc
cmdComando.CommandText = "SearchInMyTable"
rsResult.CursorType = adOpenDynamic
Set rsResult = cmdComando.Execute
cmdComando.Properties("PLSQLRSet") = False
What happen with this and how to resolve it?...
Thanks!
PD:I'm sorry for my english..
Oracle Server 9.2i
Windows XP Service Pack 1
VB 6.0
Oracon.Provider = "OraOLEDB.Oracle"
ADO 2.1