Mac Forums

Mac Forums (
-   OS X - Development and Darwin (
-   -   Java project not connecting to Access database on my W7 bootcamp. (

insinkerator 03-18-2012 04:06 PM

Java project not connecting to Access database on my W7 bootcamp.
I have a Java project that reads and writes to a database for college, it's programmed in jGrasp, and it connects to a MS access database. It works on our W7 computers in college, but when I try to execute the same code on my Windows partition I get this error:

SQL Exception: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0xc94 Thread 0xbac DBC 0x71b800

For what it's worth, this is the connection code:


try {                //try catch block for accessing database
              String url = "jdbc:odbc:Driver={Microsoft Access Driver " +
                                                            "(*.mdb, *.accdb)};DBQ=C:\\Users\\Killian\\Desktop\\Java Project 2";
              Connection con = DriverManager.getConnection(url);       
              Statement stmt = null;
              ResultSet rs = null;     
                    // SQL query command
              String SQL = "SELECT * FROM tblEmployee";
              stmt = con.createStatement();
              rs = stmt.executeQuery(SQL);
              while ( {
                  username = (rs.getString("Username")); //assigns username value from table
                  password = (rs.getString("Password")); //assigns password value from table
              catch (SQLException e)
                  System.out.println("SQL Exception: "+ e.toString());
              catch (ClassNotFoundException cE) {
                  System.out.println("Class Not Found Exception: "+

Any ideas?

All times are GMT -4. The time now is 07:08 AM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.