Questions tagged [jdbc-odbc]

The JDBC-ODBC Bridge enables Java applications to access ODBC data sources through the JDBC interface.

The JDBC-ODBC Bridge enables Java applications to access ODBC data sources through the JDBC interface. It was created to allow access to data sources that had an ODBC driver but did not have a native JDBC driver.

Important note (from Oracle's Java SE documentation):

The JDBC-ODBC Bridge should be considered a transitional solution; it will be removed in JDK 8.

301 questions
35
votes
5 answers

Removal of JDBC ODBC bridge in java 8

Starting with Java 8, the JDBC-ODBC Bridge will no longer be included with the JDK. Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); // classNotFoundException is thrown Is there any other solution connecting JDBC-ODBC Bridge?
Karthik
  • 1,132
  • 1
  • 10
  • 7
33
votes
5 answers

java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver Exception occurring. Why?

I have created an MS Access database and assigned a DSN to it. I want to access it through my Java application. This is what I am doing: public class AccessDbConnection { public static void main(String[] args) { …
hina abbasi
  • 399
  • 1
  • 3
  • 13
20
votes
3 answers

What is the best opensource dbf driver for java?

Can anybody please mention the best available opensource odbc:jdbc driver to read / write dbf.? I have a dbf file which I would like to query (select/update) via a web application (Tomcat app). Any help/tips would be appreciative. Thank you.
pinkb
  • 533
  • 2
  • 6
  • 15
18
votes
9 answers

ResultSet: Exception: set type is TYPE_FORWARD_ONLY -- why?

I have very simple code: pstat=con.prepareStatement("select typeid from users where username=? and password=?"); pstat.setString(1, username); pstat.setString(2, password); rs=pstat.executeQuery(); int rowCount=0; while(rs.next()) { …
sAaNu
  • 1,243
  • 7
  • 19
  • 45
13
votes
7 answers

"General error Unable to open registry key Temporary (volatile) ..." from Access ODBC

I tried the following: private String password = ""; private String dbName = "dataHC.accdb"; private String bd = dbName + ";PWD=" + password; String url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ="+bd+";"; private…
Erika Hernández
  • 197
  • 2
  • 2
  • 8
12
votes
2 answers

How to bind data to SQLBindCol using ODBC Driver API using C++

I'm trying to create a custom ODBC driver using C++ for a Windows environment (like PostgreSQL, Simba, Firebird, etc.) since the ODBC API has multiple ODBC API methods by default. I established connections using DSN, and I'm able to execute the SQL…
11
votes
2 answers

JDBC ODBC Driver Connection

I'm currently working on a project for a class at my University. I am learning about connecting and manipulating databases and we are using a Microsoft .accdb file. Here is what I have so far. /* Perform database operations */ try { …
James Manes
  • 506
  • 1
  • 10
  • 23
10
votes
2 answers

Manipulating a legacy MDB (Access 2.0) with Java 8

The JDBC-ODBC bridge is no longer supported with Java 8. Is there a way to access legacy MDB files without the bridge in Java 8? By legacy, I mean Access 2.0. Such old version is not supported by UCanAccess, which was suggested here.
Andre
  • 3,744
  • 3
  • 30
  • 49
8
votes
3 answers

Occurrence of org.hibernate.exception.GenericJDBCException: Could not open connection for long running process

In my application I use 20 threads for a job. Each thread calls a remote web service and updates the Oracle DB. After Jboss restart , the job fails in updating the db, with the exception that I find in log as: 2017-11-08 23:36:20,706 ERROR…
Joby Wilson Mathews
  • 7,870
  • 2
  • 42
  • 43
8
votes
8 answers

Java program to connect to Sql Server and running the sample query From Eclipse

package sqlselection; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class Sqlselection { public static void main(String[] args) { try …
Venkat
  • 307
  • 3
  • 4
  • 13
7
votes
5 answers

MS Access - Can't Open Any More Tables

at work we have to deal with several MS Access mdb files, so we use the default JdbcOdbcBridge Driver which comes with the Sun JVM and, for most cases, it works great. The problem is that when we have to deal with some larger files, we face several…
Kico Lobo
  • 4,306
  • 4
  • 32
  • 48
5
votes
2 answers

Java Access DB Connection

I try to make project with connection to db (MS Access 2010) I use this tutorial on CodeProject. import java.sql.*; public class DbAccess { public static void main(String[] args) { try { …
user2167382
  • 248
  • 1
  • 2
  • 14
5
votes
2 answers

Replacement for JDBC-ODBC Bridge

In Java 8 the JDBC-ODBC-Bridge will be removed. The typical error is: java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver Do you know of a possible replacement? I found Easysoft. But this bridge required an additional server which not…
Horcrux7
  • 21,867
  • 21
  • 85
  • 134
4
votes
1 answer

Why my code keep getting java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified?

can someone help me to let my database connected to java. I've been trying this for hours but i still got this exception : "java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified?" public…
4
votes
3 answers

How to specify null value in MS Access through the JDBC-ODBC bridge?

I am not able to call setNull on PreparedStatement using MS Access (sun.jdbc.odbc.JdbcOdbcDriver) preparedStatement.setNull(index, sqltype). Is there a workaround for this? For LONGBINARY data type, I tried the following calls, neither…
Firat
  • 133
  • 1
  • 2
  • 7
1
2 3
20 21