Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Oracle ref cursors and stored procedure queries
nickarls
<p>(I also tried this on the eclipse forums but no luck)</p>
<p> </p>
<div>Hi,</div>
<div> </div>
<div>I'm evaluating BIRT for our case where we would like to have a stored procedure when called, would generate the report data into tables and return ref cursors for those. We are using the latest ojdbc7.jar driver and latest BIRT.</div>
<div> </div>
<div>I found some examples and discussions from 2006-2008 but no recent information on current support.</div>
<div> </div>
<div>I created a sample procedure in a package "pak" which works just fine</div>
<div> </div>
<div>
<pre class="_prettyXprint">
procedure concept(out_result out sys_refcursor);
</pre>
</div>
<div> </div>
<div>And I create a BIRT report with a Data Source and a Stored Procedure-type Data Set calling</div>
<div> </div>
<div>
<pre class="_prettyXprint">
{call pak.concept(?)}</pre>
</div>
<div> </div>
<div> </div>
<div>I go to the Preview Results and get "Missing IN or OUT parameter at index 1". No problems, I go to Parameters and notice that the parameter has not been auto-created so I try to do it myself.</div>
<div> </div>
<div>
<pre class="_prettyXprint">
Name: foo
Direction: Output
Data Type: </pre>
</div>
<div> </div>
<div>Uh-oh. Running into problems. There is no good alternative here! Since the call is JDBC-backed, one would think it has to do a </div>
<div> </div>
<div>
<pre class="_prettyXprint">
stmt.registerOutParameter(1, Types.CURSOR);</pre>
</div>
<div> </div>
<div> </div>
<div>at some point but there is no alternative for that (can't even leave it blank)</div>
<div> </div>
<div>So am I doing something wrong or aren't ref cursors supported?</div>
<div> </div>
<div>Thanks in advance,</div>
<div>Nik</div>
Find more posts tagged with
Comments
There are no comments yet