|
-
Jul 22nd, 2011, 01:42 AM
#1
Thread Starter
Junior Member
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 ...
-
Jul 22nd, 2011, 08:57 AM
#2
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.
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Jul 22nd, 2011, 09:00 AM
#3
Thread Starter
Junior Member
Re: vb6 can execute own procedure but cannot execute package's procedure
 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.
-
Jul 22nd, 2011, 11:20 AM
#4
Re: vb6 can execute own procedure but cannot execute package's procedure
 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.
Last edited by abhijit; Jul 22nd, 2011 at 11:22 AM.
Reason: Added Link
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Jul 22nd, 2011, 11:29 AM
#5
Thread Starter
Junior Member
Re: vb6 can execute own procedure but cannot execute package's procedure
 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
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|