C#
OracleParameter p1 = new OracleParameter("t1", OracleType.VarChar);
OracleParameter p2 = new OracleParameter("t2", OracleType.Number);
OracleParameter p3 = new OracleParameter("t3", OracleType.VarChar,20);
OracleParameter p4 = new OracleParameter("t4", OracleType.Number);
OracleParameter p5 = new OracleParameter("t5", OracleType.Number);
OracleParameter p6 = new OracleParameter("t6", OracleType.Number);
OracleParameter p7 = new OracleParameter("t7", OracleType.Number);
p1.Direction = ParameterDirection.Input;
p2.Direction = ParameterDirection.Input;
p3.Direction = ParameterDirection.Output;
p4.Direction = ParameterDirection.Output;
p5.Direction = ParameterDirection.Output;
p6.Direction = ParameterDirection.Output;
p7.Direction = ParameterDirection.Output;
p1.Value = "1234"; p2.Value = 1;
OracleConnection conn = new OracleConnection(@"Data Source=XXX;Password=XXX;User ID=XXX");
conn.Open();
OracleCommand testCommand = conn.CreateCommand();
testCommand.CommandText = "abc.bcd";
testCommand.CommandType = CommandType.StoredProcedure;
testCommand.Parameters.Add(p1);
testCommand.Parameters.Add(p2);
testCommand.Parameters.Add(p3);
testCommand.Parameters.Add(p4);
testCommand.Parameters.Add(p5);
testCommand.Parameters.Add(p6);
testCommand.Parameters.Add(p7);
OracleDataAdapter daHIS = new OracleDataAdapter();
daHIS.SelectCommand = testCommand;
DataSet ds = new DataSet();
daHIS.Fill(ds);
conn.Close();
create or replace procedure abc.bcd(t1 in varchar2,t2 in number,t3 out varchar2 ,t4 out number,t5 out number , t6out number ,t7 out number )
declare
t3 varchar2(20);
t4 number;
t5 number;
t6 number;
t7 number;
begin
inpbill.fetch_inp_fee('123', 1, t3, t4, t4, t5, t7);
end;
慕容708150
白衣非少年
相关分类