我用ADO.NET 调用存储过程会出现
( - + case mod new not null
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> continue avg count current exists max min
prior sql stddev sum variance execute forall merge time
timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<一个带有字符集说明的可带引号的字符串文字>
<一个可带引号的 SQL 字符串> purge
符号 "(在 ":" 继续之前已插入。
存储过程是:
create or replace procedure usp_SetRoleRight
(
v_roleid in integer,
v_modelid in integer,
v_rightid in integer,
v_enabled in integer
)
is
v_rowcount int;
begin
select count(*) into v_rowcount from T_roleright where roleid=v_roleid and modelid=v_modelid and rightid=v_rightid;
if v_rowcount = 0 then
insert into T_roleright(ROLERIGHTID,roleid,modelid,rightid,enabled) values(S_T_ROLERIGHT.Nextval, v_roleid,v_modelid,v_rightid,v_enabled);
else
update T_roleright set enabled=v_enabled where roleid=v_roleid and modelid=v_modelid and rightid=v_rightid;
end if;
commit;
end usp_SetRoleRight;
我调用的方法是:
OracleConnection connection = new OracleConnection(connectionString);
OracleDataReader returnReader;
connection.Open();
OracleCommand command = BuildQueryCommand( connection,storedProcName, parameters );
command.CommandType = CommandType.StoredProcedure;
returnReader = command.ExecuteReader(CommandBehavior.CloseConnection);
希望大家帮忙下!
用 NUMBER.
创建的表的字段类型用number类型