Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help needed for runstoredprocedure command from Database toolbox

21 views
Skip to first unread message

Poh Tham

unread,
Sep 20, 2006, 1:39:32 AM9/20/06
to
Hi,

I would really appreciate some help in using the runstoredprocedure
command from the Database toolbox.

I have a stored procedure (let's call it dbo.sp), which has no input
parameters and return 3 columns of data from the SQL database. The 3
columns have the following SQL datatype, smalldatetime, varchar and
numeric.

When I tried running the runstoredprocedure command as below:

>> X =
runstoredprocedure(connect,'dbo.AggregatedPASARegionSolution',{},{java
.sql.­Types.NUMERIC})

I received the following error messages:

??? Java exception occurred:
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL
Server]Procedure AggregatedPASARegionSolution has no parameters and
arguments were supplied.

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)

Error in ==> database.runstoredprocedure at 75
csmt.executeUpdate;

Any idea how I could get the stored procedure running properly? Thank
you.

tha...@hotmail.com

unread,
Sep 20, 2006, 9:38:23 PM9/20/06
to
Replying to my own post.... I found the solution to running a stored
procedure on Matlab, if it contains more than 1 column (in my case 3
columns of data).

results = fetch(connect,'exec dbo.AggregatedPASARegionSolution');

0 new messages