首页 > 代码库 > asp.net调用oracle存储过程

asp.net调用oracle存储过程

oracle内的存储过程是通过游标返回结果集的

DataTable dt = new DataTable();            OracleParameter[] paras = new OracleParameter[5];            paras[0] = new OracleParameter("p_StartTime", OracleType.Char);            paras[0].Value =http://www.mamicode.com/ StartTime;            paras[1] = new OracleParameter("p_EndTime", OracleType.Char);            paras[1].Value =http://www.mamicode.com/ EndTime;            paras[2] = new OracleParameter("P_SelectStr", OracleType.VarChar);            paras[2].Value =http://www.mamicode.com/ SelectStr;            paras[3] = new OracleParameter("p_SubStation", OracleType.Char);            paras[3].Value =http://www.mamicode.com/ SubID;            paras[4] = new OracleParameter("io_cursor", OracleType.Cursor);            paras[4].Direction = ParameterDirection.Output;            dt = DBHelper.ExecuteTable("datacheck_handcheck.dc_handcheck_apsel", CommandType.StoredProcedure, paras);            return dt;