You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Chad Schoettger (JIRA)" <ji...@apache.org> on 2007/09/07 17:53:31 UTC
[jira] Resolved: (BEEHIVE-1203) JdbcControl & Foxpro - Data not
returned by PreparedStatement
[ https://issues.apache.org/jira/browse/BEEHIVE-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chad Schoettger resolved BEEHIVE-1203.
--------------------------------------
Resolution: Fixed
Fix Version/s: V.Next
Assignee: Julie Zhuo
Applied patch, svn rev 573618
> JdbcControl & Foxpro - Data not returned by PreparedStatement
> -------------------------------------------------------------
>
> Key: BEEHIVE-1203
> URL: https://issues.apache.org/jira/browse/BEEHIVE-1203
> Project: Beehive
> Issue Type: Bug
> Components: System Controls
> Environment: Windows XP
> Beehive 1.0.2
> HXTT Fox pro jdbc driver (3.0)
> Tomcat 5.5
> Apache commons connection pool (org.apache.commons.dbcp.BasicDataSourceFactory)
> Reporter: Steven Dalton
> Assignee: Julie Zhuo
> Fix For: V.Next
>
>
> When attempting to retrieve data from the foxpro database, the ResultSet (or Object) from the PreparedStatement was null.
> By recreating as many conditions for the PreparedStatement as provided by the JdbcControl, I discovered that the getting of the update count before getting the ResultSet was the cause.
> I moved the ps.getUpdateCount() method until after the ps.getResultSet() method call and the data was returned.
> Unfortunately I can't determine the reason for the problem (suspect a problem with the driver), but the problem is fixed using the change below.
> SQLServer database actions continue to work as expected with this change. Not sure about other databases.
> Changed from
> //
> // process returned data
> //
> ResultSet rs = null;
> int updateCount = ps.getUpdateCount();
> if (hasResults) {
> rs = ps.getResultSet();
> }
> to
> //
> // process returned data
> //
> ResultSet rs = null;
> int updateCount = -1;
> if (hasResults) {
> rs = ps.getResultSet();
> }
> updateCount = ps.getUpdateCount();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.