The easiest way to find out what's wrong is to print out the error messages
where you catch the exception.
Geert Van Damme
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Sanjay Gomes
> Sent: dinsdag 27 juni 2000 18:44
> To: [EMAIL PROTECTED]
> Subject:
>
>
> Hello All,
> I have written a simple JSP for connecting to a database and displaying a
> particular field in it.
> Can someone tell me whats wrong.
> I know that connecting through a bean is the most feasible but am
> trying out
> this simple JSP first
>
> <HTML>
> <BODY>
> <%@ page import="java.sql.*" %>
>
> <%! String dbURL="jdbc:odbc:bday";
> String dbCon="sun.jdbc.odbc.JdbcOdbcDriver";
> Connection con=null;
> ResultSet result;
> %>
> <%
> try{
> Class.forName(this.dbCon);
> con=DriverManager.getConnection(dbURL);
>
> Statement stmt=con.createStatement();
> result= stmt.executeQuery("Select * from bday ");
> }catch(Exception ex)
> {}
> %>
> <%=
> result.getString("Ename")
> %>
> <%con.close();
> %>
> </BODY>
> </HTML>
>
>
> TIA
> Sanjay
>
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets