Problem with runstoredprocedure
이전 댓글 표시
I am trying to call a oracle procedure in matlab. The procedure is as follows:
PROCEDURE test(a number, b number, c OUT number) IS BEGIN c:=a+b; END;
I have made a oracle odbc driver using querybuilder function in matlab. then I have used the following commands to connect and run the procedure.
conn = database('connectionstring','dbusername','password');
database is connected and I am able to execute sql queries and fetch the data.
But when I am using the following command, >> results = runstoredprocedure(conn,'TEST',{'3','5'},'java.sql.Types.NUMERIC'); ??? Cell contents reference from a non-cell array object.
Error in ==> database.runstoredprocedure at 76 csmt.registerOutParameter(i,typeout{i});
Can anyone please let me know what is the mistake i am doing and What should i give for OUT parameter type here.
if i have a string in the place of NUMERIC as OUT parameter what is the OUT datatype to be given in the runstoredprocedure command???
댓글 수: 1
Carsten
2013년 9월 18일
Try {java.sql.Types.NUMERIC} instead of 'java.sql.Types.NUMERIC'
답변 (1개)
tata steel
2012년 6월 27일
카테고리
도움말 센터 및 File Exchange에서 Database Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!