Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ADO, packages, stored procs with tables
Try ActiveX from Oracle called 'OracleInProcServer.
VB code is as simple as this:
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
Set OraDatabase = OraSession.OpenDatabase("SID", "scott/tiger", 0&)
Set OraDynaset = OraDatabase.CreateDynaset(
"SELECT ename FROM emp", ORADYN_DEFAULT)
While Not OraDynaset.EOF Then
EmpName = OraDynaset.Fields("ename").Value
OraDynaset2.movenext
Loop
OraDynaset.Close
...
The ActiveX allows you to do what you need. It must be in distrib where oracle client resides.
Regards
"Stuart Wachsberg" <stuart_at_vertigoxmedia.com> wrote in message news:<9pig0g$24kf$1_at_cti15.citenet.net>...
> When executing a stored proc that has a table as an out parameter, ADO does
> not seem to be able to handle it (the error message says that is does not
> have type information on the parameter).
>
> Also, I have trouble executing any procedure in a package that has out
> parameters (ADO thinks there are zero parameters). For example, in the
> following package definition below, ADO cannot access the two procs since
> they have OUT params.
>
> Can someone please confirm that ADO can or cannot handle the
> above-mentionned?
>
> Thanks, Stuart Wachsberg
>
> CREATE OR REPLACE PACKAGE stuart_pkg
> IS
> TYPE StuartType IS TABLE OF stuart.NAME %TYPE INDEX BY BINARY_INTEGER;
> stuart_tab StuartType;
> PROCEDURE stuart_getname
> (stuart_tab OUT StuartType);
> PROCEDURE stuart_getnum
> (num OUT NUMBER);
> PROCEDURE stuart_update(num in NUMBER);
>
> END stuart_pkg;
>
> CREATE OR REPLACE PACKAGE BODY stuart_pkg
> IS
>
> PROCEDURE stuart_getname (stuart_tab OUT StuartType)
> as
>
> begin
> stuart_tab(0) := 'hello';
> END stuart_getname;
>
> PROCEDURE stuart_getnum
> (num OUT NUMBER)
> as begin
> num := 10;
> END stuart_getnum;
> END stuart_pkg;
Received on Tue Oct 09 2001 - 21:14:44 CDT