Link to home
Start Free TrialLog in
Avatar of accarvajal
accarvajal

asked on

JDBC error in SQLServer connection

Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");

m_BDConexion = DriverManager.getConnection("
com.microsoft.jdbc.sqlserver.SQLServerDriver");
...

I'm trying so execute some SQL instructions, but for commiting or rollbacking this instructions i'm using Transactions (savePoint), like this

try {
            return m_BDConexion.setSavepoint("transaccion");
 } catch (SQLException e) {
 }

when this instruction is executed, generates this error:

Exception occurred during event dispatching:
java.lang.AbstractMethodError: com.microsoft.jdbc.sqlserver.SQLServerConnection.setSavepoint(Ljava/lang/String;)Ljava/sql/Savepoint;
      at ...

What it could be?


thanks
Avatar of koppcha
koppcha
Flag of United States of America image

which version of JDK you are using is it older than 1.4?
Avatar of aozarov
aozarov

Your jdbc driver, com.microsoft.jdbc.sqlserver.SQLServerDriver,  is not compatible with  JDBC 3.0 (that comes with 1.4 and above).
You might want to look at: http://forum.java.sun.com/thread.jspa?threadID=223454&start=0&tstart=0
"Re: Microsoft SqlServer JDBC Driver" which suggest having a newer driver from http://www.datadirect-technologies.com/jdbc/connectjdbc/jpxconnectjdbc.asp
In other words the feature You are trying to use is not implemented in the current driver version.
ASKER CERTIFIED SOLUTION
Avatar of orhanbaba
orhanbaba

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial