a bug-fixed runstoredprocedure.​m

버전 1.0.0.0 (2.15 KB) 작성자: Zhiqiang Zhang
There is a bug in the official runstoredprocedure. This file fixed the bug.
다운로드 수: 298
업데이트 날짜: 2011/5/9

라이선스 보기

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\

인용 양식

Zhiqiang Zhang (2024). a bug-fixed runstoredprocedure.m (https://www.mathworks.com/matlabcentral/fileexchange/31365-a-bug-fixed-runstoredprocedure-m), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Database Toolbox에 대해 자세히 알아보기
태그 태그 추가

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0