Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: ADO, packages, stored procs with tables

Re: ADO, packages, stored procs with tables

From: Gleb Shulman <glebsky_at_gmx.net>
Date: 9 Oct 2001 19:14:44 -0700
Message-ID: <8ff19c60.0110091814.4bdbc0a8@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US