Groups > IBM > WebSphere Studio Workbench > Re: No suitable driver found error




Re: No suitable driver found error

Re: No suitable driver found error
Thu, 15 Mar 2007 01:01:50 EDT
Hi,

I am trying to connect to MS Access DB through a jsp, but i get following error
"java.sql.SQLException: No suitable driver "
JSP Code
--------
<% 
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String dataSourceName = "mdbTEST";
String dbURL = "jdbc:odbc:" + dataSourceName;
java.sql.Connection connection = java.sql.DriverManager.getConnection(dbURL);
%>


but when i write a stand alone java application with the same code and run it,
it works fine
Stand Alone Java application code
----------------------------------
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String dataSourceName = "mdbTEST";
String dbURL = "jdbc:odbc:" + dataSourceName;
Connection con = DriverManager.getConnection(dbURL); 


Environment: WSAD 5.1, websphere test server 5.1

I have put rt.jar in server's classpath by double clicking
server->environment

Is MS Access compatible with WSAD 5.1?
Does JRE version come into picture?

Post Reply
about | contact