Problem with runstoredprocedure
Show older comments
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 Comment
Carsten
on 18 Sep 2013
Try {java.sql.Types.NUMERIC} instead of 'java.sql.Types.NUMERIC'
Answers (1)
tata steel
on 27 Jun 2012
Categories
Find more on Database Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!