there are some errors happen in my jsp which link to database ,the code is here:
<%@ page import="java.sql.*" contentType="text/html;charset=gb2312" %>
<%
out.println("ok<br>");
%>
<%
String url="jdbc:odbc:LBSource";
String username="LUser";
String password="1111111";
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(Exception e)
{
out.println("some wrong have happen in forname");
}
try
{
Connection con=DriverManager.getConnection(url,username,password);
}
catch(Exception e)
{
out.println("some wrong have happen in getconnection");
}
try
{
Statement stm=con.createStatement();
}
catch(Exception e)
{
out.println("some wrong have happen in createstatement");
con.close();
}
try
{
String sql="select * from book_table where bookid>3";
ResultSet rs=stm.executeQuery(sql);
}
catch(Exception e)
{
out.println("some wrong have happen in executequer");
stm.close();
con.close();
}
%>
<%
out.println("<br>ok");
%>
thanks !!


