How do I execute a stored procedure with the Database Toolbox?
5 ビュー (過去 30 日間)
古いコメントを表示
I would like to execute a stored procedure with the Database Toolbox.
採用された回答
MathWorks Support Team
2009 年 6 月 27 日
This feature has been added in the Database Toolbox 3.2 (R2006b). You can use the RUNSTOREDPROCEDURE function. If you are using a previous version, read below for any workarounds.
Assuming that you set up the initial connection to the database, you can execute the procedures using the EXEC command. There are two kinds of procedures, those that do not take any input arguments and those that take one or more arguments.
To execute procedures that do not take any arguments:
exec(c,'stored_procedure')
To execute procedures that take one or more input arguments:
exec(c,'{call sp_name(input1, input2,...)}')
Note the curly braces in the above command.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Database Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!