db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: [jira] Commented: (DERBY-501) Client and embedded drivers differ on invoking a procedure that returns a single Dynamic resultSet using CallableStatement.executeQuery()
Date Fri, 12 Aug 2005 16:42:55 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
That is not a URL... Look at Jira entry for that bug. Not sure why it
shows as URL in email...<br>
<br>
If you have a JDBC 4.0 spec, I was just pointing a section there that
discusses this topic.<br>
<br>
Satheesh<br>
<br>
Mamta Satoor wrote:<br>
<blockquote cite="midd9619e4a050812093449848ad0@mail.gmail.com"
 type="cite">
  <div>Satheesh,</div>
  <div>&nbsp;</div>
  <div>The url below does not work. Can you please fix it?</div>
  <div>&nbsp;</div>
  <div>thanks,</div>
  <div>Mamta<br>
&nbsp;</div>
  <div><span class="gmail_quote">On 8/11/05, <b
 class="gmail_sendername">Satheesh Bandaram (JIRA)</b> &lt;<a
 href="mailto:derby-dev@db.apache.org">derby-dev@db.apache.org</a>&gt;
wrote:</span>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left:
1ex;">&nbsp;&nbsp;
[ <a
 href="http://issues.apache.org/jira/browse/DERBY-501?page=comments#action_12318543">http://issues.apache.org/jira/browse/DERBY-501?page=comments#action_12318543
    </a> ]<br>
    <br>
Satheesh Bandaram commented on DERBY-501:<br>
-----------------------------------------<br>
    <br>
Just checked JDBC 4.0 spec... It confirms
CallableStatement.executeQuery() should be supported for Stored
Procedures that return a single resultset. See section <a
 href="http://13.3.3.1">13.3.3.1</a>.<br>
    <br>
&gt; Client and embedded drivers differ on invoking a procedure that
returns a single Dynamic resultSet using
CallableStatement.executeQuery()<br>
&gt;
-----------------------------------------------------------------------------------------------------------------------------------------
    <br>
&gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Key:
DERBY-501<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;URL:
<a
 href="http://issues.apache.org/jira/browse/DERBY-501">http://issues.apache.org/jira/browse/DERBY-501</a><br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Project: Derby<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Type:
Bug
    <br>
&gt;&nbsp;&nbsp; Components: JDBC<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; Versions: <a href="http://10.0.2.1">10.0.2.1</a>,
<a
 href="http://10.1.1.0">10.1.1.0</a><br>
&gt;&nbsp;&nbsp;Environment: All Platforms<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; Reporter: Satheesh Bandaram<br>
&gt;&nbsp;&nbsp;Attachments: Test.java, Test1.java<br>
&gt;<br>
&gt; It is possible to invoke a stored procedure that returns a single
dynamic result using CallableStatement.executeQuery using Derby Client.
The embedded JDBC driver, however, throws an exception like:
    <br>
&gt; Test starting ...url = jdbc:derby:tdb<br>
&gt; Exception in thread "main" ERROR X0Y78: Statement.executeQuery()
cannot be called with a statement that returns a row count.<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.derby.iapi.error.StandardException.newException
(StandardException.java:301)<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:434)<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java
:1142)<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1323)<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(EmbedCallableStatement.java
:109)<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(EmbedPreparedStatement.java:241)<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
Test1.main(Test1.java:26)<br>
&gt; I think the embedded driver behavior is incorrect here, though I
would double check that the JDBC spec says.
    <br>
&gt; To reproduce the problem,<br>
&gt; 1) Create a database called 'tdb' and a table called COMPANY as
create table COMPANY(name char(10));<br>
&gt; 2) Insert two rows as: insert into COMPANY values 'IBM', 'SUN';<br>
&gt; 3) register a procedure as:
    <br>
&gt; CREATE PROCEDURE GETALLCOMPANIES() PARAMETER STYLE JAVA LANGUAGE
JAVA READS SQL DATA DYNAMIC RESULT SETS 1 EXTERNAL NAME
'Test.getAllCompanies'<br>
&gt; 4) Set server classpath<br>
&gt; 5) Compile two attached java programs, Test and Test1
    <br>
&gt; 6) Execute 'java Test1 1' to run as a client program and 'java
Test1 2' to run as an embedded program.<br>
    <br>
--<br>
This message is automatically generated by JIRA.<br>
-<br>
If you think it was sent incorrectly contact one of the administrators:
    <br>
&nbsp;&nbsp;<a href="http://issues.apache.org/jira/secure/Administrators.jspa">http://issues.apache.org/jira/secure/Administrators.jspa</a><br>
-<br>
For more information on JIRA, see:<br>
&nbsp;&nbsp;<a href="http://www.atlassian.com/software/jira">
http://www.atlassian.com/software/jira</a><br>
    <br>
  </blockquote>
  </div>
  <br>
</blockquote>
</body>
</html>


Mime
View raw message