This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes JDBC ODBC error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JDBC ODBC error" Watch "JDBC ODBC error" New topic


Manu Quartier

Joined: Oct 20, 2000
Posts: 10
I use Visual Age 3.0 and JDK 1.2.2. In VA, I have have no problem, but when I run my code with java.exe, I have an error:
The instruction at "0x...." referenced memory at "0x....". The memory could not be "read".
Can somebody help me?
Here is the code :
import java.sql.*;
public class DB {
public static void main(String args[]) {

String url = "jdbcdbc:Equadis";
Connection con;

String query = "select id_rayon, var_nom_rayon from rayon";

try {

} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
try {
con = DriverManager.getConnection(url, "sa", "");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(query);

System.out.println("gnagna test");
//the error appens here ->
while ( {
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
I agree. Here's the link:
subject: JDBC ODBC error
It's not a secret anymore!