Hi, All
I've been searching for the sample of how to retrieve resultset back from ORACLE ... I still got no clue . Following is my code .
Please Help. Thank you so much in advance
Chatawat L.
ORACLE PART
Code:create or replace package reftest as type empCur is ref cursor; Procedure GetEmpData(En in VARCHAR2, EmpCursor in out empCur); END; create or replace package body reftest as Procedure GetEmpData (EN in VARCHAR2, EmpCursor in out empCur) is begin open EmpCursor for select ename, hiredate from emp where ename LIKE EN; end; end;
VB6 PART
Code:Option Explicit Dim Cn As rdoConnection Dim En As rdoEnvironment Dim CPw As rdoQuery Dim Rs As rdoResultset Dim Conn As String Dim QSQL As String Dim Response As String Dim Prompt As String Private Sub btnExecute_Click() CPw(0) = Text1.Text ' Text1.Text = "ALLEN" <--------- ERROR : 40041 Couldn't find item indicated by text CPw.Execute Prompt = "Return value from stored procedure is " & CPw(1) & "." Response = MsgBox(Prompt, , "Stored Procedure Result") End Sub Private Sub Form_Load() Conn = "UID=scott;PWD=tiger;DSN=MY_DSN;" Set En = rdoEnvironments(0) Set Cn = En.OpenConnection("", rdDriverNoPrompt, False, Conn) QSQL = "{ call REFTEST.GETEMPDATA(?,?) }" Set CPw = Cn.CreateQuery("", QSQL) End Sub


Reply With Quote
