Hi Steve,

This change seems fine, I'll go ahead and check it into the repository.

 - Thanks, Chad

On 9/5/07, Steven Dalton <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]
> Sent: Friday, 27 July 2007 2:07 PM
> To: [email protected]
> 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.
>
>
>
>

Reply via email to