View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
a bug-fixed runstoredprocedure.m

Be the first to rate this file! 2 Downloads (last 30 days) File Size: 2.15 KB File ID: #31365 Version: 1.0

a bug-fixed runstoredprocedure.​m


Zhiqiang Zhang (view profile)


There is a bug in the official runstoredprocedure. This file fixed the bug.

| Watch this File

File Information

There is a bug in the runstoredprocedure when query a stored procedure of Oracle database.

bug example: let c be a connection object of an Oracle database, when you query an stored procedure with a string input, like blows:

  x = runstoredprocedure(c,'myprocinonly',{2500,'Jones'})

Then error occurs:

??? Java exception occurred:
java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'myproc'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)

at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)

at sun.jdbc.odbc.JdbcOdbc.SQLExecute(Unknown Source)

at sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(Unknown Source)

at sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeUpdate(Unknown Source)

The bug-fix is very simple, replace the 53-th line in runstoredprocedure to following:

  else%if strcmp(sDbName,'MySQL') || strcmp(sDbName,'Microsoft SQL Server')

or download the attachment, and replace the runstoredprocedure.m under your \toolbox\database\database\@database\

Required Products Database Toolbox
MATLAB release MATLAB 7.11 (R2010b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us