MATLAB: Do I receive an error when I use RUNSTOREDPROCEDURE in the Database Toolbox 3.3 (R2007a)

Database Toolbox

When I try to run my stored procedure in my SQL database with the following command:
results = runstoredprocedure(conn, sp_name, parms_in, types_out)
where types_out is a cell array specifying the types of the output arguments:
types_out = {'varchar','decimal'}
I get the following error:
??? Java exception occurred:
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid
character value for cast specification

Best Answer

This error occurs if you have not specifed outputs arguments in your stored procedure.
If instead of output arguments your stored procedure is returning a result set, you can run it and retrieve the results using the EXEC and FETCH commands.
To see an example of using the EXEC command to run a stored procedure, type "doc exec" at the MATLAB command prompt.