我想在Oracle中调用一个存储过程,它有一个CLOB作为输出参数。我正在使用以下代码来调用,但是收到错误 -
var sql = @"DECLARE
l_clob CLOB;
l_inv_type nm_inv_types.nit_inv_type%TYPE := 'SULA';
BEGIN
xmrwa_inv_type_xml.get_inv_type_xml(pi_nit_inv_type => l_inv_type
,po_xml => l_clob
);
RETURNING l_clob INTO :key;
END;
";
var connString = string.Format(connectionString, OracleDBUser, OracleDBPassword);
using (var conn = new Oracle.ManagedDataAccess.Client.OracleConnection(connString))
using (var command = new Oracle.ManagedDataAccess.Client.OracleCommand(sql, conn))
{
conn.Open();
// make the :key parameter an output param
var p2 = command.Parameters.Add(":key", null);
p2.Direction = ParameterDirection.Output;
p2.OracleDbType = OracleDbType.Clob;
var v = command.ExecuteReader();
}
错误Detais - ORA-06550:第8行,第39栏: PLS-00103:遇到以下任何一种情况时遇到符号“L_CLOB”:
:=。 (@%;
有人可以帮我解决这个问题吗?
答案 0 :(得分:0)
尝试删除
结束后