SQL Exception No suitable driver.
This is my code:
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
}catch(Exception e){
setError("Can´t find database driver class: "+e);
return;
}
try{
String url="jdbcdbc:HumanResources";
java.sql.Connection c = DriverManager.getConnection(url,"admin","hr"
java.sql.Statement st = c.createStatement();
java.sql.ResultSet rs = st.executeQuery("select * from HRMHR"
java.sql.ResultSetMetaData md = rs.getMetaData();
rs.close();
c.close();
}catch(SQLException ee){
setError("SQLException "+ee.getSQLState());
}
The message of getSQLState is 08001
I´m using Windows2000, IIS, and a MSAccess database.
With applet viewer works fine, but with a browser, SQLException appears.
I don´t know if it´s the security policy, or some problems with system dns or file dns.
If the problem is file dns, please help, cause i really don´t understaind much of it.
i have the sun/jdbc/odbc/*.class in my InetPub/ i have try to put the database file in InetPub/
i am trying to run the applet in the same computer where IIS is installed.
i added rt.jar to my system classpath.
i really need help....
This is my code:
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
}catch(Exception e){
setError("Can´t find database driver class: "+e);
return;
}
try{
String url="jdbcdbc:HumanResources";
java.sql.Connection c = DriverManager.getConnection(url,"admin","hr"
java.sql.Statement st = c.createStatement();
java.sql.ResultSet rs = st.executeQuery("select * from HRMHR"
java.sql.ResultSetMetaData md = rs.getMetaData();
rs.close();
c.close();
}catch(SQLException ee){
setError("SQLException "+ee.getSQLState());
}
The message of getSQLState is 08001
I´m using Windows2000, IIS, and a MSAccess database.
With applet viewer works fine, but with a browser, SQLException appears.
I don´t know if it´s the security policy, or some problems with system dns or file dns.
If the problem is file dns, please help, cause i really don´t understaind much of it.
i have the sun/jdbc/odbc/*.class in my InetPub/ i have try to put the database file in InetPub/
i am trying to run the applet in the same computer where IIS is installed.
i added rt.jar to my system classpath.
i really need help....