执行oracle 存储过程如下: OracleConnection con=new OracleConnection(strcon);
OracleCommand cmd=new OracleCommand();
OracleTransaction mytrans ;
try
{
conOpen ();
mytrans =conBeginTransaction();
cmdConnection =con;
cmdCommandText =rfgetid;
cmdCommandType =CommandType StoredProcedure;
cmdTransaction =mytrans ;
OracleParameter parameter_in=new OracleParameter(as_bmOracleTypeChar);
OracleParameter parameter_out=new OracleParameter (as_sxhOracleType Number );
parameter_inDirection =ParameterDirection Input;
parameter_outDirection=ParameterDirection Output ;
parameter_in Value =tblnameToUpper();
cmdParameters Add(parameter_in );
cmdParametersAdd(parameter_out);
cmdExecuteNonQuery();
mytrans Commit();
return intParse(parameter_out ValueToString()) ;
}
catch(Exception er)
{
throw new Exception(erMessage);
mytrans Rollback();
}
finally
{
cmdDispose ();
conClose ();
}