存储过程不适用于C#

时间:2017-04-26 17:47:47

标签: oracle stored-procedures plsql

我试图在C#程序中使用这个存储过程,但它一直告诉我,即使我的包正确构建,我的包的第5行也有错误。

以下是有问题的一行:

enter image description here

select 
    NUMQUESTION, ENONCEQUESTION into pNumQuestion, Enonce 
from 
    (select 
         NumQuestion, EnonceQuestion 
     from 
         QUESTIONS 
     where 
         FLAG = 'n' 
         and CodeCategorie = CategorieQuestion 
     order by 
         (dbms_random.value(1,100)) ) 
where 
    rownum = 1;

如果可以提供帮助,这是完整的程序。

  Procedure CHERCHERQUESTION(Enonce Out VARCHAR2, Reponce Out 
  VariableRenvois, CategorieQuestion In CHAR) AS
  pNumQuestion char(6);
  BEGIN
  select NUMQUESTION, ENONCEQUESTION into pNumQuestion, Enonce from (select 
  NumQuestion,EnonceQuestion from QUESTIONS where FLAG = 'n' and 
  CodeCategorie = CategorieQuestion order by (dbms_random.value(1,100)) ) 
  where rownum =1;
  update QUESTIONS set FLAG = 'Y' where NUMQUESTION = pNumQuestion;
  open Reponce for select ENONCER, ESTBONNE  from REPONSES where NUMQUESTION 
  = pNumQuestion;
  END CHERCHERQUESTION;

我已经添加了它在我的C#项目中抛出的错误的图像。

https://thumb.gyazo.com/thumb/1200/_5dba9ac08fed3419e451eefe5fd9db32-png.jpg

0 个答案:

没有答案