because i don't know type or size of parameter
so i can't use createpameter method of ado.command.
i must use paramterter.refresh to get these information.
problem:
if i want to return recordset from procedure of oracle,i must define a ref
cursor in package.
create or replace package pkg_Test is
TYPE curReturn IS REF
CURSOR RETURN TEST%ROWTYPE;
PROCEDURE pc_GetRecordset(v_Recordset OUT curReturn);
end pkg_Test;
when i write a procedure in package:
create or replace package body pkg_Test is
PROCEDURE pc_GetRecordset(v_Recordset OUT curReturn)
IS
BEGIN
OPEN v_Recordset FOR
SELECT * FROM test;
END;
end pkg_Test;
i call it in vb like this:
cmd.commantext = "pkg_test.pc_getrecordset'
but this call can't use paramterter.refresh
i find this from microsoft:
When you use ADO with Oracle stored procedures that are contained within
Oracle packages, you must explicitly create parameters that the stored
procedure requires and append these parameters to the Parameters collection
of the ADO Command object. You cannot use the Refresh method to retrieve the
list of expected parameters.
so i hope to return recordset from procedure not in package:
create or replace procedure pc_GetRecordset(v_Out out pkg_Test.curReturn )
is
begin
open v_Out for
select * from test;
end pc_GetRecordset;
but when i call it in vb,i get error:
error: 3708 You have improperly defined a Parameter object.
how can i do????
i hope to find a solution to get recordset from procedure but not use
createparameter!
hope to your answer. thx a lot.
Albert Reid - 30 Aug 2003 16:50 GMT
I use Oracle Packages in many of my projects. Many of them return
recordsets. My question to you is what sort of a SP are you trying to use
where you don't know the data type or size of the IN or OUT parameter?
> because i don't know type or size of parameter
> so i can't use createpameter method of ado.command.
[quoted text clipped - 53 lines]
>
> hope to your answer. thx a lot.