>
> Hi,
> I get confuse when I try to connect JSP and Mysql.
>
> I use statement:
>
> <%@page import="java.sql.*"%>
> <%
> //Khai bao ket noi:
> Connection conn;
> Statement stm;
> ResultSet rs_matau;
> String sql_matau="";
>
> //Create connection:
> Class.forName("org.gjt.mm.mysql.Driver");
> conn =
> DriverManager.getConnection("jdbc:mysql_caucho://localhost/ticket"
> ,"root","");
> stm = conn.createStatement();
> ...
> %>
>
> After I browse, Netscape display error message:
>
JDBC functions should always be encapseled in try-catch blocks!
and it maybe a good idea to put the code in a separate class with database
connection pooling aso.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>