protected void Button1_Click(object sender, EventArgs e)
{
string nianyue = year_mon.Text.Substring(0, 4) + year_mon.Text.Substring(5, 2);
string conn = ConfigurationManager.ConnectionStrings["OraclePro"].ConnectionString;
OracleConnection connection = new OracleConnection(conn);
connection.Open();
OracleCommand cmd = connection.CreateCommand(); //连接存储过程
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "Get_WELL_INJ_FCHGL";
// cmd.CommandText = "mxl_add2"; nam
cmd.Parameters.Add("yearmonth", System.Data.OracleClient.OracleType.NVarChar).Direction = ParameterDirection.Input;//运行报错
cmd.Parameters["yearmonth"].Value = nianyue;
cmd.Parameters.Add("result", System.Data.OracleClient.OracleType.Cursor).Direction = ParameterDirection.Output; //定义参数;
cmd.ExecuteNonQuery();
connection.Close();