首页 新闻 赞助 找找看

C# 執行Oracle匿名塊

0
悬赏园豆:5 [已关闭问题] 关闭于 2011-03-24 13:31

有如下匿名塊:在查詢分析器中執行成功!
但用sqlComm.ExecuteNonQuery()執行卻顯示失敗!,有知道的大俠們,告訴我一下原因,謝謝!
declare
  newid decimal;
begin
  insert into trs_jobm
    (job_name, job_type, begin_time, add_user, add_time)
  values
    ('測試Job3', 'w', '10:11', 1721, sysdate)
  returning job_id into newid;
  insert into trs_job_week
    (job_id, weeks, run_weeks)
  values
    (newid, 1, '1,2');
  insert into trs_job_advanced
    (job_id, begin_date, end_date, is_repeat, times, unit, end_time)
  values
    (newid, '20110316', '', 'Y', 25, 'M', '10:11');
  commit;
exception
  when others then
    rollback;
    raise_application_error(-20009, sqlerrm);
end;

soarfe的主页 soarfe | 初学一级 | 园豆:146
提问于:2011-03-17 11:19
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册