Saturday, April 05 2014
Keywords: Oracle Projects, Visual Studio 2010, 2012, 2013, Debug Oracle Stored Procedures in VS, Oracle 11g, Oracle 12g, Oracle 12c
Running Oracle stored procedures and viewing the output results in Visual Studio. Part 5 of 5
38) You could easily run Oracle stored procedures in Visual Studio and visualize the values of all the parameters without using a plugin or a third party tool such as Toad.
Since Oracle stored procedures output record sets in form of 'REFCURSOR' type parameters...then the 'value' of those output parameters could also be viewed.
In "Server Explorer", under your Oracle connection... you have the choice of either to either "Run" the stored procedure or "Run Debug" where you would also step into the code. It is important to note that by running stored procedures directly from "Server Explorer" you are interacting directly with the Oracle database server and are not interacting with your Visual Studio solution in any ways.
39) After running a stored procedure, a new page will automatically open up, with a table in it displaying all the Out Parameters. If you want to see the record sets returned by REFCURSOR output parameter of stored procedures, then click on the corresponding table cell called "value".
The output data is then displayed.
40) I edited the stored procedure right within Server Explorer, by adding a second output column (DateTime field), and then I ran the procedure again, just to show how it displays multiple column outputs.
Written by Montreal DBA Team
Download the scripts for this article (Prior to unzipping the content of the file you must Right-Click on the file --> Properties --> Unblock)