Connection.prepareStatement() problem 
Author Message
 Connection.prepareStatement() problem

Hello,

When I make a call to Connection.prepareStatement(<string>) I get the
following exception:

java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Can't start a
cloned connection while in manual transaction mode.
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
        at com.microsoft.jdbc.base.BaseConnection.getImplConnection(Unknown
Source)
        at com.microsoft.jdbc.base.BaseStatement.getImplConnection(Unknown
Source)
        at com.microsoft.jdbc.base.BaseStatement.getImplStatement(Unknown
Source)
        at com.microsoft.jdbc.base.BaseStatement.preProcessSQL(Unknown
Source)
        at com.microsoft.jdbc.base.BasePreparedStatement.<init>(Unknown
Source)
        at com.microsoft.jdbc.base.BaseConnection.prepareStatement(Unknown
Source)
    ...

This doesn't seem to happen with other JDBC drivers so I suspect some
limitiation, but I'm not sure what it may be.  This is the 2nd prepared
statement call made in made code (this first appears to succeed).
Suggestions?

Thank you,

Bob



Sat, 22 May 2004 05:17:16 GMT
 Connection.prepareStatement() problem

You need to alter your URL to set the SelectMethod parameter to 'cursor'.

Check the driver documentation "SQL Server 2000 JDBC User's Guide and
Reference" page 24.

Regards,

David Harbige


Quote:
> Hello,

> When I make a call to Connection.prepareStatement(<string>) I get the
> following exception:

> java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Can't start a
> cloned connection while in manual transaction mode.
>         at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
> Source)
>         at

com.microsoft.jdbc.base.BaseConnection.getImplConnection(Unknown
Quote:
> Source)
>         at com.microsoft.jdbc.base.BaseStatement.getImplConnection(Unknown
> Source)
>         at com.microsoft.jdbc.base.BaseStatement.getImplStatement(Unknown
> Source)
>         at com.microsoft.jdbc.base.BaseStatement.preProcessSQL(Unknown
> Source)
>         at com.microsoft.jdbc.base.BasePreparedStatement.<init>(Unknown
> Source)
>         at com.microsoft.jdbc.base.BaseConnection.prepareStatement(Unknown
> Source)
>     ...

> This doesn't seem to happen with other JDBC drivers so I suspect some
> limitiation, but I'm not sure what it may be.  This is the 2nd prepared
> statement call made in made code (this first appears to succeed).
> Suggestions?

> Thank you,

> Bob



Sun, 23 May 2004 21:03:57 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. PrepareStatement problem

2. Problem with JBoss - prepareStatement failing

3. JDBC : PrepareStatement with LIKE clause problem

4. Problem with prepareStatement

5. Does PrepareStatement open any cursor?

6. JDBC and Informix: Support prepareStatement?

7. Question in prepareStatement of JDBC

8. Informix and JDBC: Support prepareStatement?

9. Question in prepareStatement of JDBC

10. preparestatement.getGeneratedKeys() and mySQL

11. Exception in prepareStatement(String) function

12. JDBC prepareStatement exceptions always returns Invalid Statement error


 
Powered by phpBB® Forum Software