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.

307 questions
0
votes
0 answers

Pervasive JDBC connection failing

I need to connect to a pervasive database for my java application. In the code below, my try block will always throw a ClassNotFoundException import java.sql.*; public class TesterClass { public static void main(String[] args) { …
ForeverStudent
  • 2,487
  • 1
  • 14
  • 33
0
votes
1 answer

How to send SQL query to SparkSQL from a web application

I have an application that performs SQL query on Spark DataFrame like this: DataFrame sqlDataFrame = sqlContext.createDataFrame(accessLogs, ApacheAccessLog.class); sqlDataFrame.registerTempTable("logs"); sqlContext.cacheTable("logs"); Row…
0
votes
1 answer

How to list all tables' name in MSAccess database file using sql query in java?

I've getting some code here String url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" + f.getPath() + ";"; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection conn =…
yao
  • 1
  • 2
0
votes
1 answer

How to get the table names from a *.mdb file using java jdbc-odbc bridge?

String url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" + f.getPath() + ";"; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection conn = DriverManager.getConnection(url); DatabaseMetaData meta…
yao
  • 1
  • 2
0
votes
1 answer

how to select data from a database by using a variable?

I have a SQL Server 2008 database and I want to select data by using a String variable... here is the selection code in java: try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con =…
0
votes
1 answer

Null Pointer Exception while executeUpdate for a query using JDBC

I am getting a Null Pointer Exception while executing the insert query. Everything seems to be fine but the problem still exists. Code used for Database Connection. public class DBConnect { static Connection c ; static Statement st ; { …
0
votes
0 answers

stumped by "[Microsoft][ODBC Driver Manager] Invalid cursor state"

I have looked at every single example on SO (and also looked elsewhere) and I'm stumped about this one. tblNodes is the MS Access dbase table for storage of a JTree... at read-in I'm trying to find all cases where there is anomalous case of more…
mike rodent
  • 14,126
  • 11
  • 103
  • 157
0
votes
1 answer

Connect to a SQL Anywhere 5.0 DB from java

I need to connect to a Billing system which is backed by a SQL Anywhere 5.0 DB and I am pretty much drawing a blank when I try to find a jodbc driver for this. I was successful in doing this with an upgraded version(SQL Anywhere 11) by using the…
0
votes
1 answer

JDBC-to-ODBC Bridge for Cassandra on Ubuntu

I want to create JDBC-to-ODBC Bridge on Ubuntu, and then want to access in Java. I installed unixODBC and Cassandra ODBC driver and set DSN in odbc.ini file and Driver in odbcinst.ini file and as well as also export both file and and…
0
votes
1 answer

.mdb is not opening when created using java

i am creating a .mdb file using java as i am working with MS-ACCESS database files. But i am facing one problem. Suppose a created a file named file.mdb using new File("file.mdb").createNewFile();. No doubt it creates the file successfully, but when…
0
votes
1 answer

Query excel based database from SQLDeveloper

I am on a Windows 7 machine and have configured a ODBC connection by name of 'MyExcelDb' to an excel file. I am able to programatically connect to 'MyExcelDb' using type-1 jdbc driver and everything is working fine. I now want to use Oracle…
0
votes
2 answers

wildcards in preparedstatement not executing

I am trying to get wildcards to execute in my preparedstatements but on running it returns empty result in resultset even after using appropriate method, only if i search particular keyword the statement executes. My html file:
Kaijju
  • 143
  • 10
0
votes
0 answers

invalid stream header: CAFEBABE exception in applet while reading from database through java code

I am try to get some info from database and show it on applet . for that i am setting connection and getting data through another class then transfer it to the applet but in applet code when i set inputstream to that class file then i am getting…
0
votes
1 answer

The latest Java that contains JDBC-ODBC

Does anyone know what the most recent version of JDK and or JRE that contains the JDBC-ODBC bridge driver? I have this jar that parses XML into Microsoft Access. I didn't realize the driver was removed when I was updating and now desperately trying…
ZenMasta
  • 134
  • 1
  • 1
  • 9
0
votes
2 answers

Insert Statement not working in java

I am trying to insert records in my table.the problem is its giving error like incomplete query .i am not able to figure out the bug here. Thanks in advance Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String table="student"; Connection con =…
Bhushan Gadekar
  • 83
  • 1
  • 10