I have a Oracle stored procedure spGetContinents (cur_continents out t_cursor).
now i want to store data in a drop downlist but how do i do that?
ddlContinents.DataSource =
GetData("CasCadingDropDownList.spGETCONTINENTS", "cur_continents", null);
private DataSet GetData(string spName, string crsName, OracleParameter spParameter)
{
string CS = ConfigurationManager.ConnectionStrings["ConStrNHAOrcl"].ConnectionString;
using (OracleConnection con = new OracleConnection(CS))
{
OracleCommand cmd = new OracleCommand(spName,con);
cmd.Parameters.Add(crsName, OracleType.Cursor).Direction = ParameterDirection.Output;
cmd.CommandType = CommandType.StoredProcedure;
DataSet ds = new DataSet();
OracleDataAdapter da = new OracleDataAdapter();
da.SelectCommand = cmd;
da.Fill(ds);
but it won't work. how can i do this?
Ramesh MaruthiPosted Sep 9, 2014, 5:47 PM
try in this way
and am confused little bit what parameters do you pass to the stored proc ? if you have more than one parameters to pass just add the parameters to the oraclec ommand in this way:
Ramesh MaruthiPosted Sep 10, 2014, 4:05 PM
andreas domevscekPosted Sep 10, 2014, 3:38 PM
none but i found the answer i had to add return(ds) at last I forgot
but thx anyway for giving me so quick answer!