create or replace procedure sp_insert_log(id in number,machine in varchar2,content in varchar2,
         tsystem in varchar2,tuser in varchar2, tjb in varchar2,tmodule in varchar2,
         ttype in varchar2,returnvalue out number)
         as
         begin
            insert into xt_aqgl_rz(id,t_machine,t_content,t_system,t_user,t_jb,t_module,t_type)
                   values(id,machine,content,tsystem,tuser,tjb,tmodule,ttype);
            returnvalue:=1;
            EXCEPTION
           when others then                  begin  ROLLBACK;
                 returnvalue:=-1; 
                end;
     end sp_insert_log;
     

解决方案 »

  1.   

    1. 代码不规范啊
    id in number
    变量最好喝表中的字段最好不要重名。
    2. 你的begin ... end 我始终搞不清楚干什么用的
    begin ROLLBACK;
      returnvalue:=-1;  
      end;建议你将调用语句,以及报错信息,完整的发出来。
      

  2.   

    谢谢,我查到原因了,从上面代码看来是没有任何错误,是肉眼发现不了的错误,问题应该是按空格或shift键时输入法的状态。begin ;
      returnvalue:=-1;   
      ROLLBACK
    end;
      

  3.   


    谢谢,我查到原因了,从上面代码看来是没有任何错误,是肉眼发现不了的错误,问题应该是按空格或shift键时输入法的状态。begin ;
      returnvalue:=-1;   
      ROLLBACK
    end;