At a guess from the error message, the problem is not in fact with rs.next(),
but are you attempting to retrieve an int from the ResultSet on a following
line? e.g. int id = rs.getInt("id");

If the column you are attempting to retrieve data for is not of integer type, it
could cause an error while converting at this stage. Check carefully.

- simon


"PATIBANDA, SRIKANTH" wrote:

> Hi,
>
> I am having some problem with rs.next().
> I am able to execute the query,
>         statement = connection.createStatement();
>         query = "Select * from XYZ";
>         rs = statement.executeQuery(query);
>
>         ResultSetMetaData rsmd = rs.getMetaData();
>       numCols = rsmd.getColumnCount();
>
>         for (i=1; i<=numCols; i++) {
>         out.println("<td><H3>" + rsmd.getColumnLabel(i) + "</H3></td>");
>       }
>
> My program is working till here very fine. I was able to display the
> columnlabel, the coulumn count and etc.
> The problem come now...in the while loop...
>
>         while (rs.next()) {
>
> Its not that there is no data...there is data in the oracle database. When i
> do directly from SQL> prompt works fine..with the same query its not working
> with JDBC.
>
> At this point iam getting this following error...
>
>         "ORA-01455: converting column overflows integer datatype."
>
> I debugged and i am sure the problem is with rs.next()...
> Does anyone know about this problem..what could be the solution...
> I really appreciate anyone help.
> ThankYou
> Srikanth Patibanda
> IT Specialist
> Entergy Corporation
> Ph: (W)504-576-5444

___________________________________________________________________________
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