What I have got from this post is that you may have some problem with this line of code -
Scotty_M:myCMD.Parameters.Add(New OracleParameter("out_cursor", OracleType.Cursor)).Direction = ParameterDirection.Output
Try this -
===============================================
try
{
string strconn = "whatEverConnectStr";
OracleConnection conn = new OracleConnection(strconn);
OracleCommand objCmd = new OracleCommand();
objCmd.Connection = conn;
objCmd.CommandText = "getAllCity";
objCmd.CommandType = CommandType.StoredProcedure;
objCmd.Parameters.Add("p_recordset", OracleType.Cursor).Direction = ParameterDirection.Output;
OracleDataAdapter odr = new OracleDataAdapter(objCmd);
DataSet ds = new DataSet();
odr.Fill(ds);
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
}
catch (Exception ex)
{
string excep = ex.Message;
}
=================================================
Make sure the name of output parameter ( p_recordset in this case) is same in code and in stored proc.
=================================================
Sample SP -
create or replace
PROCEDURE GETALL
(
p_recordset OUT types.cursor_type
)
/*
Created By : Manas
*/
AS
BEGIN
OPEN p_recordset FOR
select col1,col2 from tablename;
END GETALL;
=======================================
types.cursor_type is -
create or replace
PACKAGE Types AS
TYPE cursor_type IS REF CURSOR;
END Types;
==============================================
Hope it helps.
-Manas
=======================================
If this post is useful to you, please mark it as answer.