我想从oracle存储过程返回的C#中的立场输出。 DBMS_OUTPUT.PUT_LINE(“你好字”) 我使用C#代码是如何获得oracle存储过程标准输出在c#
using (OracleConnection con = new OracleConnection())
{
con.ConnectionString = My_connection_string;
con.Open();
OracleCommand cmd = new OracleCommand("tmp_test", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.BindByName = true;
var result = cmd.ExecuteScalar();
}
的Oracle存储过程的代码是
create or replace procedure tmp_test as
v_count integer;
begin
dbms_output.put_line('Hello Word');
end;
存储过程执行成功,但我不能让你好字回来。
我是否需要在C#代码中使用GET_LINES。如果是的话,我该如何使用这个。 – user3202862
您需要从原始存储过程中的GET_LINES中返回值。 – toadflakz