You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Steven Dalton (JIRA)" <ji...@apache.org> on 2007/07/27 06:37:03 UTC
[jira] Created: (BEEHIVE-1203) JdbcControl & Foxpro - Data not
returned by PreparedStatement
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
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.
Re: [jira] Created: (BEEHIVE-1203) JdbcControl & Foxpro - Data notreturned by PreparedStatement
Posted by Chad Schoettger <ch...@gmail.com>.
Hi Steve,
This change seems fine, I'll go ahead and check it into the repository.
- Thanks, Chad
On 9/5/07, Steven Dalton <St...@mswl.com.au> wrote:
>
> Was wondering if there have been any thoughts on this issue?
>
> Has anyone else reproduced this problem or discovered any problems with
> my fix?
>
> Cheers
>
> Steven Dalton
>
>
>
> -----Original Message-----
> From: Steven Dalton (JIRA) [mailto:jira@apache.org]
> Sent: Friday, 27 July 2007 2:07 PM
> To: dev@beehive.apache.org
> Subject: [jira] Created: (BEEHIVE-1203) JdbcControl & Foxpro - Data
> notreturned by PreparedStatement
>
> 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
>
>
> 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.
>
>
>
>
RE: [jira] Created: (BEEHIVE-1203) JdbcControl & Foxpro - Data notreturned by PreparedStatement
Posted by Steven Dalton <St...@mswl.com.au>.
Was wondering if there have been any thoughts on this issue?
Has anyone else reproduced this problem or discovered any problems with
my fix?
Cheers
Steven Dalton
-----Original Message-----
From: Steven Dalton (JIRA) [mailto:jira@apache.org]
Sent: Friday, 27 July 2007 2:07 PM
To: dev@beehive.apache.org
Subject: [jira] Created: (BEEHIVE-1203) JdbcControl & Foxpro - Data
notreturned by PreparedStatement
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
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.
[jira] Resolved: (BEEHIVE-1203) JdbcControl & Foxpro - Data not
returned by PreparedStatement
Posted by "Chad Schoettger (JIRA)" <ji...@apache.org>.
[ 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.