vb6 can execute own procedure but cannot execute package's procedure
hi, all
I have a problem as describe on topic. please see my codes below ...
Code:
Dim CPw As New rdoQuery
Set CPw.ActiveConnection = Cn
QSQL = "{ CALL TEST(?) }"
Set CPw = Cn.CreateQuery("", QSQL)
CPw(0).Direction = rdParamOutput
Set Rs = CPw.OpenResultset
Prompt = "Return value from stored procedure is " & CPw(0) & "."
Response = MsgBox(Prompt, , "Stored Procedure Result")
with this code. it was executed successfully.
Code:
Dim CPw As New rdoQuery
Set CPw.ActiveConnection = Cn
QSQL = "{ CALL REFTEST.GETMYVAR(?) }"
Set CPw = Cn.CreateQuery("", QSQL)
CPw(0).Direction = rdParamOutput <<<< ERROR
Set Rs = CPw.OpenResultset
Prompt = "Return value from stored procedure is " & CPw(0) & "."
Response = MsgBox(Prompt, , "Stored Procedure Result")
but this code error : couldn't find item indicated by text. Following is my Package's procedure code ...
Code:
create or replace
package body reftest
as
Procedure GetMyVar(theValue IN OUT NUMBER)
Is
Begin
theValue := 10;
End;
end;
Please help ... :cry:
Re: vb6 can execute own procedure but cannot execute package's procedure
Firstly, is it possible for you to use ADO instead of RDO? Ado lets you define a parameter as Inputoutput instead of just output.
Re: vb6 can execute own procedure but cannot execute package's procedure
Quote:
Originally Posted by
abhijit
Firstly, is it possible for you to use ADO instead of RDO? Ado lets you define a parameter as Inputoutput instead of just output.
Hi, abhijit
thanks for replying. I knew that ADO is 100% better but It's my client code . I can't do anything with that . So I got to develop with RDO . So Sad
Chatawat L.
Re: vb6 can execute own procedure but cannot execute package's procedure
Quote:
Originally Posted by
ClOuD_Za
Hi, abhijit
thanks for replying. I knew that ADO is 100% better but It's my client code . I can't do anything with that . So I got to develop with RDO . So Sad
Chatawat L.
Hi,
I do not know if RDO will support an INPUTOUTPUT parameter. Perhaps you want to read some documentation on RDO. If a param has been defined as InputOutput, your client object must also treat it as InputOutput.
That's a general rule. I found this article on msdn, but it doesn't have everything you're looking for.
Re: vb6 can execute own procedure but cannot execute package's procedure
Quote:
Originally Posted by
abhijit
Hi,
I do not know if RDO will support an INPUTOUTPUT parameter. Perhaps you want to read some documentation on RDO. If a param has been defined as InputOutput, your client object must also treat it as InputOutput.
That's a general rule. I found
this article on msdn, but it doesn't have everything you're looking for.
As you can see in my above code. I'm using rdParamOutput , for INPUT OUTPUT parameter type , which has been test by myself with other 30+ Stored Procedured that it's 100% working with INPUT OUTPUT parameter type. So i think the problem is not at the parameter type.
thanks for replying and suggestion :)