Previous Next

How to use a stored procedure to retrieve data from a JDBC data source

This procedure assumes you have already created the JDBC data source that this data set uses.

1  
2  
1  
In Data Source Selection, select the JDBC data source to use.
2  
3  
Query displays a template for executing a stored procedure.
3  
In Available Items, navigate to the stored procedure. Select the stored procedure, and drag it to the text area. The stored procedure name appears at the insertion point. Type the arguments if the stored procedure uses parameters.
Figure 3-3 shows a stored procedure selected in Available Items. The stored procedure has three parameters. The text area displays the call statement to run the stored procedure.

Figure 3-3 Displaying stored procedures in a database

Figure 3-3  Displaying stored procedures in a database
4  
5  
*
If the stored procedure returns a result set, choose Preview Results to see the data rows. If a stored procedure returns multiple result sets, select the result set you want by specifying the result set’s name or number. To do so, choose Settings and, in Result Set Selection, specify the result set. Figure 3-4 shows an example of selecting the second result set.

Figure 3-4 Selecting a result set

Figure 3-4  Selecting a result set
*
If the stored procedure returns output parameter values, choose Preview Output Parameters. Figure 3-5 shows an example of the values returned by the stored procedure shown in Figure 3-3.

Figure 3-5 Previewing output parameter values

Figure 3-5  Previewing output parameter values

(c) Copyright Actuate Corporation 2012