MATLAB Answers

0

Is it possible to call packaged Oracle functions using the Database Toolbox 3.2 (R2006b)?

Asked by Sanchali Purandare on 16 Jan 2011
I would like to call the functions in my Oracle package using the Database Toolbox.

  0 Comments

Sign in to comment.

1 Answer

Answer by Sanchali Purandare on 16 Jan 2011

You may call the functions in your package using the syntax of
.
Thus, when using the connection called myconn, if your function is called myfunction and it is in the package called mypackage, then here are two ways of calling it:
exec (myconn, 'mypackage.myfunction')
or
runstoredprocedure(myconn, 'mypackage.myfunction')
If your packaged function returns values or needs input parameters then you need to use the RUNSTOREDPROCEDURE function with an input parameter specified as a cell array and a specified return type. To see an example of this, execute the following at the MATLAB command prompt:
doc runstoredprocedure
and examine the second and third examples.

  0 Comments

Sign in to comment.