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.
results = fetch(connect,'exec dbo.AggregatedPASARegionSolution');