very simple

ur declaring rs as a local variable so it has to be initialized to any value
before ur accessing it.  Instead of

ResultSet rs;

say

ResultSet rs=null;

and put ur code in a try and catch block.

Hope this Helps
Srini

Kelsey Fedde wrote:

> JDBCServlet.java:115: Variable rs may not have been initialized.
>  String sd  =  rs.getString(2);
>                �
> JDBCServlet.java:115: Exception java.sql.SQLException must be caught, or it
> must
>  be declared in the throws clause of this method.
>  String sd  =  rs.getString(2);
>
> p.s.  the 2 is meant to refer to line 2 of a db2 table I am accessing this
> table from OS/390
>
> I can't find and correct the error (been working on this for hours)  I dont'
> have a debugger and
> write entirely in notepad....
> suggestions?
>
> thanks,
> Kelsey
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to