2 Replies Latest reply on Mar 6, 2002 5:06 PM by 19901

    CreateOraObject("type_name", "package_name"). Is this valid?

    19901
      Can someone help me how to call the following package/procedure using OO4O? FYI - I tried the above syntax, but it is not working.

      Here is the procedure specification: I am trying to call the save_message() procedure from VB6.0 using OO4O 8.1.6.3.13
      Any help would be appreciated!

      CREATE OR REPLACE PACKAGE broadmsg_pkg AS

      TYPE t_SMsgRec IS RECORD (
      MessageGrd_0 VARCHAR2(1),
      MessageGrd_2 VARCHAR2(1999),
      MessageGrd_3 VARCHAR2(11),
      MessageGrd_4 VARCHAR2(10) );

      TYPE t_SMsgTable IS TABLE OF t_SMsgRec;

      PROCEDURE save_message(ErrorCode OUT NUMBER,
      v_SMsgs IN broadmsg_pkg.t_SMsgTable);

      END broadmsg_pkg;

        • 1. re:CreateOraObject(
          152901
          I do not believe you are able to pass a record type (t_SMsgRec) as an IN parameter via OO4O.

          You can pass individual parameters as a TABLE ARRAY for each MessageGrd_x parameter. You would create and bind a Parameter Array for each parameter. You do have to know and declare the dimmensioned size upfront.

          If you were only intending to pass one record, create individual parameters for your procedure declaration.


          Zane E
          • 2. re:CreateOraObject(
            19901
            Hi Zane Schott
            You are right. I posted this question to Oracle Staff and got this reply. I still don't understand why there is no support for RECORD/TABLE type in OO4O. The sample codes have no clue. If anyone succeeded in this PL/SQL through OO4O, please let me know. Thanks. Krishnan

            Here is the REPLY from Oracle: QUOTE
            Krishnan,
            The Record you posted in your pl/sql code can only be used in pl/sql it can not be called from Oracle Objects for OLE. If you want a collection of data, use either a varray or a nested table.

            Thanks,
            Jill
            Oracle Support Services
            ---------------
            From: Venkatakrishnan Krishnan 28-Feb-02 21:39
            Subject: Re : OO4O & RECORD/TABLE TYPE
            Jil
            Is this what you mean by VARRAY's / NESTED tables?
            CREATE OR REPLACE PACKAGE broadmsg_pkg AS
            TYPE VCHARARRAY is TABLE OF VARCHAR2(1999) index by BINARY_INTEGER;
            PROCEDURE save_message(ErrorCode OUT NUMBER,
            MessageGrd_0 IN VCHARARRAY,
            MessageGrd_2 IN VCHARARRAY,
            MessageGrd_3 IN VCHARARRAY,
            MessageGrd_4 IN VCHARARRAY);
            END broadmsg_pkg;

            P.S.: Does this mean OO4O does not support my previous PL/SQL block? I am wondering if OO4O can support the new OBJECT type, why not this as I see this RECORD type most widely used in all PL/SQL blocks. Do you see any future versions /under development release of OO4O can support this type.?

            Thanks for your time and reply.
            ---------------
            From: Oracle, Jill Nickerson 01-Mar-02 14:18
            Subject: Re : Re : OO4O & RECORD/TABLE TYPE
            Sir,
            Please see our samples in the metalink under top tech docs -> Oracle Objects for ole -> scripts/sample code.

            Also since record is a PL/sql ONLY type Oracle Objects for OLE is not going to implement it. Remember Record type is for use within pl/sql ONLY, it is NOT used by an other tool.

            Thanks,
            Jill
            Oracle Support Services
            --- UNQUOTE