I am having some problem in jsp. When i try to connect my jsp application to database
it gives me error "No suitable driver".I am using Tomcat server and Access 97.
I am giving u the code here.
<%@ page import="java.sql.*" %>
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
}
catch (java.lang.ClassNotFoundException ex)
{ }
try
{
<% Connection connection = DriverManager.getConnection("jdbc:odbc:project"); %>
}
catch (SQLException ex)
{}
<% Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery("select * from registration"); %>
<P> The results are:
</P>
<UL>
<% while (resultSet.next()) { %>
<LI><%= resultSet.getString(1) %></LI>
<% } %>
</UL>
********************************
Please Note :My java application runs fine and gives no problem even while using
Database.
I am using WindowsMe.and Access97 database.
My autoexec.bat is as follows.
SET
CLASSPATH=C:\jdk1.2.2\bin;C:\jdk1.2.2\lib;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\jdk1.2.2\jre\bin;
SET windir=C:\WINDOWS
SET winbootdir=C:\WINDOWS
SET COMSPEC=C:\WINDOWS\COMMAND.COM
SET PROMPT=$p$g
SET TEMP=C:\WINDOWS\TEMP
SET TMP=C:\WINDOWS\TEMP
SET BLASTER=A220 I5 D1 T4
SET JAVA_HOME=C:\jdk1.2.2
SET TOMCAT_HOME=c:\tomcat
waiting for your response
bye
gautam
[EMAIL PROTECTED]
______________________________________________________
123India.com - India's Premier Portal
Get your Free Email Account at http://www.123india.com