I am a student and we are working on a project in Access database but in windows.
When I go back home I tried to run and edit the project but it didn't work. Notice that I don't have Access installed on my mac.
My questions:
1- do I have to install Access on my mac?
2- If not why do I have this error?
package DB;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
public class empQueries {
private static String URL = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=/Users/Home/Desktop/My Tools/DB + proj/HR.mdb";
private static String userName =""; //Access no neeed for username or password
private static String Password ="";
private Connection Con = null;
private PreparedStatement selectAllStatement = null;
private PreparedStatement insertNewPerson = null;
private PreparedStatement updatePerson = null;
private PreparedStatement deletePerson = null;
public empQueries()
{
try {
Con = DriverManager.getConnection(URL);
System.out.print("Success");
} catch (SQLException ex) {
System.out.print("not Success");;
}
}
public static void main(String [] args)
{
empQueries Test = new empQueries();
}
}
Thanks.