> -----Original Message-----
> From: A mailing list about Java Server Pages specification
> and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Daniel Robertson
>
> Well, I'm actually checking for NULL values before converting
> to string. And
> I've checked the database for all NULL values, doesn't seem
> to have any.
>
> This error now seems to occur when I execute my select query.
> The table has
> three text fields, and when I select one of them (note that
> I'm not even
> getting the textfield value, this is *just* when I select it)
> it gives me
> the Null error message.
>
> I'm also worried it might be the way I'm connecting to the
> database that's
> causing this. Each time I go to a new JSP page I connect to
> the database,
> execute a query, get the values and close the connection. So I'm not
> actually keeping the connection open. Is this approach not
> working? Should I
> keep one or more connection open, even though this is a not a
> heavy-traffic
> site?
>
> Thanks for helping.
Try the putting the following around the offending code:
try
....
} catch( Exception e ) {
out.println( "Error occured: " + e + "<P>");
e.printStackTrace( new PrintWriter( out ) );
}
This should give you more information about the error.
-Are you closing the connections to the database (you might be using all the
connections up), I see you are closing the resultset but are you also
closing the connection?
-Is your database case sensitive with table and column names?
HTH,
Steve S
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html