Dear all,
Please Help me. It's very Urgent....
Iam calling an OracleHelper.executeReader() from Data Access Layer by passing
these many parameters
OracleParameter[] ora = new OracleParameter[2];
ora[0] = new OracleParameter("prm_lastChangedBy",
OracleType.VarChar);
ora[0].Direction = ParameterDirection.Input;
ora[0].Value = "CHS";
ora[1] = new OracleParameter("o_result_cursor", OracleType.Cursor);
ora[1].Direction = ParameterDirection.Output;
reader = OracleHelper.ExecuteReader(OraConnectionString, TEST,
ora);
ArrayList CurrencyList= new ArrayList();
while (reader.Read())
{
CurrencyClass currency = new
CurrencyClass(Convert.ToInt32(reader["Currency_id"].ToString()),
reader["NAME"].ToString());
CurrencyList.Add(currency);
}
And on the DB this is the procedure parameters set
CREATE OR REPLACE PROCEDURE TEST
(
prm_lastChangedBy IN chs_currencies.Lastchangedby%TYPE,
o_result_cursor OUT sys_refcursor
)
AS
begin
open o_result_cursor for select currency_id, name,shortcode
FROM chs_currencies
WHERE SUPERSEDED_IN_JS_YN='N'and Lastchangedby=prm_lastChangedBy
ORDER BY sort_order, name ASC;
close o_result_cursor;
return;
END TEST;
I checked with both the datatypes and number of arguments on both sides i.e
with parameters passing frm code and the Parameters set in the SP.. But while
Executing the Reader it shows me an error saying "Failed to convert parameter
value from a OracleParameter to a String"
Please help me. it's very urgent
Thanks & Regards
H.Ashok
---------------------------------
Heres a new way to find what you're looking for - Yahoo! Answers
[Non-text portions of this message have been removed]