Lee Smith

Lee Smith

  • NA
  • 1
  • 0

Package problem using oracle custom type

Aug 27 2008 11:11 AM

Hi,

Hope you can help, if you can i will be very grateful...

My problems is...

I have a package that is using an oracle type, cut out below

TYPE NAME AS TABLE OF OBJECT.TYPE

OBJECT.TYPE AS OBJECT

( UNIQUE_PARCEL_ID                                   VARCHAR2(16)
 ACTION_CODE                                        VARCHAR2(2)
 STATUS_DATE                                        DATE
 REASON_CODE                                        VARCHAR2(3)
 CONTAINER_ID                                       VARCHAR2(16)
 MIGRATION_SET_ID                                   NUMBER(3)
 ROUTE_CODE                                         VARCHAR2(2))

The package is...

PROCEDURE main(p_calling_system           IN  VARCHAR2,
               p_calling_service          IN  VARCHAR2,
               p_unique_id                IN  VARCHAR2,
               p_user_id                  IN  VARCHAR2,
               p_location_id              IN  VARCHAR2,
               p_van_reg                  IN  VARCHAR2,
               p_depot_code               IN  VARCHAR2,
               hht_tracking_detail        IN  T_TAB_HHT_TRACKING_DETAIL,
               p_return_code              OUT NUMBER,
               p_return_message           OUT VARCHAR2);
END;

My problem is i dont know how to call the procedure while mapping to hht_tracking_detail...

This is what i have...

OracleParameter OraParam = new OracleParameter();

//OraParam.OracleDbType = OracleDbType.Varchar2;

//OraParam.Direction = ParameterDirection.Input;

OraParam.CollectionType = OracleCollectionType.PLSQLAssociativeArray;

OraParam.DbType = DbType.Object;

OraParam.Value = new string[7] { UPI, "SC", Convert.ToString(date), "", "ConID", "", ""};

OraParam.Direction = ParameterDirection.Input;

OraParam.Size = 8000;

OraParam.ParameterName = "hht_tracking_detail";

/*OraParam.ArrayBindSize = new int[7] {16, 2,150 , 3, 16, 3, 2};

OraParam.ArrayBindStatus = new OracleParameterStatus[7]

{ OracleParameterStatus.Success,

OracleParameterStatus.Success,

OracleParameterStatus.Success,

OracleParameterStatus.Success,

OracleParameterStatus.Success,

OracleParameterStatus.Success,

OracleParameterStatus.Success};*/

oCmd.Parameters.Add(OraParam);

 

the error is saying i have the incorrect params