that doesn't sound right....are you sure you're pulling back a value from a 
column that's a string?

-----Original Message-----
From: Mohammed Zabin [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 21, 2007 6:02 AM
To: Tomcat Users List
Subject: Re: Null


I tried it the other way, if( rs.getString("field") == null ) but the
compiler plames that null can't be compared to string....

On 6/21/07, Tim Funk <[EMAIL PROTECTED]> wrote:
>
>
> if (null == rs.getString("col_foo")) {
>    out.println("<td>&nbsp;</td>");
> } else {
>    // Evil since this doesn't escape the xml - for edutainment only
>    out.println("<td>" + rs.getString("col_foo") + "</td>");
> }
>
> -Tim
>
> Mohammed Zabin wrote:
> > Hi All
> >
> > Anyone knows how to deal with null values in JDBC ResultSet??
> >
> > I am trying to render a table in jsp page that read its value from the
> > database, sometimes, the database returns null values, and so, the whole
> > table couldn't be rendered. Is there any way to deal with null values.
> >
> > Thanks
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to