there alot of things that can be wrong?
First start with looking at your code, make sure everything is spelled correctly, if you are using MSAccess your connection should look similar to the following.
Perhaps you forgot to set your Data source. Go to control panel, double click on 'ODBC Data Source (32bit), click on 'System DSN' tab, click on the add button, select 'Microsoft Access Driver (*.mdb)', click finish, enter a source name (anything you like.) Then select a database (click on the 'select' button) and click ok.
Within your codes:-
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
}
catch(ClassNotFoundException cn)
{
System.out.println(cn);
}
try
{
// if you enter 'test' as your database source name it will look like this
Connection myConnection = DriverManager.getConnection("jdbcdbc:test);
...
}
catch (SQLException s)
{
s.printStackTrace();
}
Hope this helps,
Leon If you need additional help, you can email to me at zaoliang@hotmail.com I don't guaranty that I will be able to solve your problems but I will try my best
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.