Problem with runstoredprocedure
Afficher commentaires plus anciens
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 commentaire
Carsten
le 18 Sep 2013
Try {java.sql.Types.NUMERIC} instead of 'java.sql.Types.NUMERIC'
Réponses (1)
tata steel
le 27 Juin 2012
Catégories
En savoir plus sur Database Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!