Thanx Ron n Gunaseelan
result.next() solved the problem
Regards
Sanjay
>From: Gunaseelan Nagarajan <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
> reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Date: Tue, 27 Jun 2000 05:03:28 -0700
>
>hi,
>you have not given
>rs.next()
>
>--- Sanjay Gomes <[EMAIL PROTECTED]> wrote:
> > 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
> >
> >
>
>__________________________________________________
>Do You Yahoo!?
>Get Yahoo! Mail - Free email you can access from anywhere!
>http://mail.yahoo.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
________________________________________________________________________
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