Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with a REF CURSOR and ADO Recorset

EyesJun 10 2004 — edited Jun 10 2004
Hi,

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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 8 2004
Added on Jun 10 2004
1 comment
856 views