ashley 0

ashley 0

  • NA
  • 7
  • 0

ODP.Net Stored Procedures

Sep 7 2004 3:33 AM
Does anyone have ANY idea how to get a return parameter of type "Table of varchar2(2000)" Our DBA has written a stored proce that reurns a parameter of this type, and I get the error message that says I have the incorrect number or type of parameters. the code I have now is as follows (but this returns the before mentioned error) --------------------------------------- oraCmd = new OracleCommand(""+ " "+ Session["OraProcSchema"].ToString() +".MIS_MSISDN_QRY_PKG.QueryDetailData "+ ""); oraCmd.Connection = dbConn.GetConnection(); oraCmd.CommandType = CommandType.StoredProcedure; oraCmd.Parameters.Add("p_msisdn", OracleDbType.Varchar2, DBConnection.SpecialChars(tbMSISDN.Text), ParameterDirection.Input); oraCmd.Parameters.Add("p_fromdate", OracleDbType.Varchar2, tbFromDate.Text, ParameterDirection.Input); oraCmd.Parameters.Add("p_todate", OracleDbType.Varchar2, tbToDate.Text, ParameterDirection.Input); oraCmd.Parameters.Add("p_datecol_uid", OracleDbType.Int32, tbDateCol_UID.Text, ParameterDirection.Input); oraCmd.Parameters.Add("p_table_uid", OracleDbType.Int32, tbTable_UID.Text, ParameterDirection.Input); oraCmd.Parameters.Add("p_contact_uid", OracleDbType.Int32, Session["Contact_UID"].ToString(), ParameterDirection.Input); oraCmd.Parameters.Add("p_columnformat", OracleDbType.Varchar2, ParameterDirection.Output); oraCmd.Parameters.Add("p_outdata", OracleDbType.Varchar2, ParameterDirection.Output); oraCmd.ExecuteNonQuery(); strHeader = oraCmd.Parameters["p_columnformat"].Value.ToString(); strData = oraCmd.Parameters["p_outdata"].Value.ToString(); ----------------------------------------------------------- procedure definition is as follows...... ----------------------------------------------------------- PROCEDURE QueryDetailData (p_msisdn IN VARCHAR2, p_fromdate IN VARCHAR2, p_todate IN VARCHAR2, p_datecol_uid IN NUMBER, p_table_uid IN NUMBER, p_contact_uid IN NUMBER, p_columnformat OUT VARCHAR2, p_outdata OUT toutdata) ------------------------------------------------------------ PLEASE - this is quite urgent. Thanks in advance....