I'm trying to get started with the good book "Database Programming with JDBC and Java". Am using Access as a local database but cannot find the driver class name needed for Class.forname(). Can anybody point this out? Also: I really like this eporkchop site. Just what I needed to learn more Java.
If you downloaded Java from the Sun webpage, try the following: Class.forName("sun.jdbc.odbc.JdcbOdbcDriver"); For the url, you will have to find out what your computer calls it. You can double-click on the ODBC icon in the Control Panel to add, modify and delete database references. Given the above classname and a database reference called, "OLE_DB_NWind_Jet", the next two lines of code may look like: String url = "jdbc dbc:OLE_DB_NWIND_Jet"; Connection con = DriverManager.getConnection(url, "", ""); Hope that helps.
Now I've turned off the smiley face stuff which should turn off that problem with the colon followed by the letter "oh". This added message should fix the thread. It should say String url = "jdbc dbc:OLE_DB_NWIND_Jet"