User`s guide
7 Functions — Alphabetical List
7-208
runstoredprocedure
Call stored procedure with and without input and output arguments
This function calls a stored procedure that has no input arguments, no output
arguments, or any combination of input and output arguments. Define and instantiate
this stored procedure in your database.
You can use this function if you connect to your database using a JDBC driver or the
ODBC/JDBC bridge. For details, see “Connecting to a Database”. If you are using the
native ODBC interface to connect to your database, use exec to call the stored procedure.
Syntax
results = runstoredprocedure(conn,spname)
results = runstoredprocedure(conn,spname,inputargs)
results = runstoredprocedure(conn,spname,inputargs,outputtypes)
Description
results = runstoredprocedure(conn,spname) calls the stored procedure spname
using the database connection conn. results is a logical 1 if the stored procedure
returns a data set. Otherwise, results is a logical 0.
results = runstoredprocedure(conn,spname,inputargs) calls the stored
procedure that accepts one or more input arguments inputargs.
results = runstoredprocedure(conn,spname,inputargs,outputtypes) calls
the stored procedure that returns output arguments by specifying the output argument
data types outputtypes. results is a cell array that contains one or more output
arguments.