1 Reply Latest reply on Sep 2, 2003 5:13 PM by 82532

    Creating a table parameter in OO4O and VB

    401947
      Hello,
      I have the following types defined in Oracle:

      TYPE rec_inv_flex_col_details IS RECORD
      (ita_attrib_name nm_inv_type_attribs.ita_attrib_name%TYPE
      ,ita_scrn_text nm_inv_type_attribs.ita_scrn_text%TYPE
      ,ita_view_col_name nm_inv_type_attribs.ita_view_col_name%TYPE
      ,ita_id_domain nm_inv_type_attribs.ita_id_domain%TYPE
      ,iit_lov_sql nm3type.max_varchar2
      ,ita_mandatory_yn nm_inv_type_attribs.ita_mandatory_yn%TYPE
      ,ita_mandatory_asterisk VARCHAR2(1)
      ,iit_value_orig nm3type.max_varchar2
      ,iit_value nm3type.max_varchar2
      ,iit_description nm3type.max_varchar2
      );

      TYPE tab_rec_inv_flex_col_details IS TABLE OF rec_inv_flex_col_details INDEX BY BINARY_INTEGER;


      I also have the following procedure defined:

      PROCEDURE get_inv_flex_col_details (pi_iit_ne_id IN nm_inv_items.iit_ne_id%TYPE
      ,pi_nit_inv_type IN nm_inv_types.nit_inv_type%TYPE
      ,pi_display_xsp_if_reqd IN BOOLEAN DEFAULT TRUE
      ,pi_display_descr IN BOOLEAN DEFAULT TRUE
      ,pi_display_start_date IN BOOLEAN DEFAULT TRUE
      ,pi_display_admin_unit IN BOOLEAN DEFAULT TRUE
      ,po_flex_col_dets IN OUT tab_rec_inv_flex_col_details
      );


      What I'm trying to do is create a parameter of type tab_rec_inv_flex_col_details in OO4O using the following VB statements:

      strSQL = "declare " & _
      "atable nm3asset.tab_rec_inv_flex_col_details;" & _
      "begin " & _
      "nm3asset.get_inv_flex_col_details(pi_iit_ne_id => 12345 , pi_nit_inv_type => 'asdf',
      po_flex_col_dets => :atable); " & _
      "end; "

      oraDatabase.Parameters.Add "atable", Null, ORAPARM_OUTPUT, ORATYPE_TABLE, "atable"
      oraDatabase.Parameters("atable").serverType = ORATYPE_TABLE
      oraDatabase.ExecuteSQL strSQL

      However, when the ExecuteSQL method is called, I get the following error message:

      OIP-04149: Invalid input object for field and parameters

      My goal is to be able to create a dynaset from this table parameter. Does anyone have any suggestions on what is causing this error message and how to go about fixing it? Thank you for absolutely any suggestions.

      Regards,

      Rafael