I am write a program that supports the online enquery of test marks where the database is using .xls file.
I have added test.xls to the data Source ODBC --> system DSN.
The code is as follows:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc dbc:test";
Connection connection =
java.sql.DriverManager.getConnection(url, "", "");
java.sql.Statement st=connection.createStatement();
String query = "SELECT * from [sheet1] ";
ResultSet rs = st.executeQuery(query);
connection.close();
It doesn't work. Any one can help me out?
The error information is display as:
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at markquery._0002fmarkquery_0002fMarkRetriever_0002ejspMarkRetriever_js
p_10._jspService(_0002fmarkquery_0002fMarkRetriever_0002ejspMarkRetriever_jsp_10
.java:96)
I have added test.xls to the data Source ODBC --> system DSN.
The code is as follows:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc dbc:test";
Connection connection =
java.sql.DriverManager.getConnection(url, "", "");
java.sql.Statement st=connection.createStatement();
String query = "SELECT * from [sheet1] ";
ResultSet rs = st.executeQuery(query);
connection.close();
It doesn't work. Any one can help me out?
The error information is display as:
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at markquery._0002fmarkquery_0002fMarkRetriever_0002ejspMarkRetriever_js
p_10._jspService(_0002fmarkquery_0002fMarkRetriever_0002ejspMarkRetriever_jsp_10
.java:96)