
I create db on my system using MS-acess,then I create DSN for program but I still not get answer It throws an Exception "java.lang.classNotFoundException",what is this I don't get plz help me.

Create DSN connection:
1. Open Data Sources (Start->Control Panel->Administrative Tool->Data Sources(ODBC)
2. Open User DSN tab
3. Add a user DSN
4. Select Microsoft Access Driver(*.mdb)
5. Select database name and Create the DSN name (e.g emp)
6. Click "Ok" and then compile the following java code.
import java.sql.*;
public class CreateTable {
public static void main(String[] args) throws Exception {
Connection conn = DriverManager.getConnection("jdbc:odbc:student");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Statement st = conn.createStatement();
st.executeUpdate("create table employee (empid int,empname varchar(30));");
System.out.println("Table is created successfully!");
st.executeUpdate("insert into employee (empid,empname ) values (1,'Roseindia')");
System.out.println("Data is inserted successfully!");
st.close();
conn.close();
}
}

Yes sir I have done it & it compiled properly but when i run it Eception is come(java.lang.ClassNotFoundException:jdbc.odbc.JdbcOdbcDriver) what is this?I dont get plz tell me.

Yes sir i got answer thank u very much
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.