Hi,
Please check the order of the fields in the table 'emp'.
Bye
----- Original Message -----
From: Nithyananda Thiagarajan <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 21, 2000 2:23 PM


> Hi all,
>         When trying to execute a query "Select ename,sal,job,mgr from emp
"
> , from a servlet using jdbc I get the error
>                                Error in SQLjava.sql.SQLException:
Exhausted
> Resultset.
>         When I replace the query to select and display a single column ,
it
> functions as expected.
>         Can anybody throw some light on why this might happen?
>
>
> Here is the portion of the code:
>     Statement stmt = conn.createStatement ();
>
>     // Select the ENAME column from the EMP table
>     ResultSet rset = stmt.executeQuery ("Select ename,sal,job,mgr from emp
");
>     // Iterate through the result and print the employee names
>     while (rset.next ())
>       out.println (rset.getString (1));
>       out.println (rset.getFloat (2));
>       out.println (rset.getString (3));
>       out.println (rset.getInt (4));
>       out.println("SQL Success");
>
>     }
>      catch(SQLException r)
>     {
>       out.println("Error in SQL"+r);
>     }
>
>
>
>
> Thanx and regds
> Nithyananda
>
>
___________________________________________________________________________
> 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