Vb6, rdo and resultset from oracle
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
Re: Vb6, rdo and resultset from oracle
Thread moved to the 'Database Development' forum (the 'VB6' forum is only meant for questions which don't fit in more specific forums)
Re: Vb6, rdo and resultset from oracle
thanks for moving the thread, sorry about that
Re: Vb6, rdo and resultset from oracle
Why RDO? It's a deprecated technology that was superseded by ADO more than decade ago.
Read this FAQ article by Gary.
Re: Vb6, rdo and resultset from oracle
It's my customer's code which I have to develop something into it ... I know it's old control but I had no choice.