getting SQLException Please help

hi when im running the function

public boolean getRptIds(String condStr, Vector resultVec)

throws SQLException

{

String queryStr = "SELECT rpt_ids FROM " + viewName + "\n";

if ( condStr.length() != 0 )// for total

queryStr += "WHERE " + condStr;

System.out.println("getSubsetRptIds queryStr=");

System.out.println(queryStr);

stmt = atwConn.createStatement();

ResultSet rset = stmt.executeQuery(queryStr);

String rptIds;

while (rset.next ()) {

rptIds = rset.getString(1);

resultVec.addElement(rptIds);

//System.out.println (rptIds);

}

rset.close();

stmt.close();

return (resultVec.size()>0);

}

im getting the following error

java.sql.SQLException: Bigger type length than Maximum

at java.lang.Throwable.<init>(Compiled Code)

at java.lang.Exception.<init>(Compiled Code)

at java.sql.SQLException.<init>(Compiled Code)

at oracle.jdbc.dbaccess.DBError.check_error(Compiled Code)

at oracle.jdbc.ttc7.TTCInBuffer.buffer2Value(Compiled Code)

at oracle.jdbc.ttc7.TTCInBuffer.get4Bytes(Compiled Code)

at oracle.jdbc.ttc7.TTIMsg.unmarshalUB4(Compiled Code)

at oracle.jdbc.ttc7.Oall7.receive(Compiled Code)

at oracle.jdbc.ttc7.TTC7Protocol.doOall7(Compiled Code)

at oracle.jdbc.ttc7.TTC7Protocol.fetch(Compiled Code)

at oracle.jdbc.driver.OracleResultSet.next(Compiled Code)

at Viewer.getRptIds(Compiled Code)

at FetchRptIds.execute(Compiled Code)

at Report.createOnePage(Compiled Code)

at Report.createReport(Compiled Code)

at AtwRS.processReq(Compiled Code)

at AtwRS.doPost(Compiled Code)

at javax.servlet.http.HttpServlet.service(Compiled Code)

at javax.servlet.http.HttpServlet.service(Compiled Code)

at sun.servlet.http.HttpServerHandler.sendResponse(Compiled Code)

at sun.servlet.http.HttpServerHandler.handleConnection(Compiled Code)

at sun.servlet.http.HttpServerHandler.run(Compiled Code)

at java.lang.Thread.run(Compiled Code)

the java version is 1.1.7 and

Oracle7 Server Release 7.3.4.0.1

PL/SQL Release 2.3.4.0.0

[2231 byte] By [Sashi12aa] at [2007-11-26 19:10:49]
# 1

1. When you post code use the code formatting tags. It make it easier for everyone to read your code.

2. Use prepared statements whenever you can.

3. You didn't include the query you are running but based on the error message it sounds like the database column datatypes can't support the size of a number in your query.

zadoka at 2007-7-9 21:07:15 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2

public boolean getRptIds(String condStr, Vector resultVec) throws SQLException

{

String queryStr = "SELECT rpt_ids FROM " + viewName + "\n";

if ( condStr.length() != 0 ) // for total

queryStr += "WHERE " + condStr;

System.out.println("getSubsetRptIds queryStr=");

System.out.println(queryStr);

stmt = atwConn.createStatement();

ResultSet rset = stmt.executeQuery(queryStr);

String rptIds;

while (rset.next ()) {

rptIds = rset.getString(1);

resultVec.addElement(rptIds);

//System.out.println (rptIds);

}

rset.close();

stmt.close();

return (resultVec.size()>0);

}

Ive tried my best here and the query used is

select rpt_ids from view_105;

Sashi12aa at 2007-7-9 21:07:15 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 3
Is the exception thrown when you run the query or get the results?How big is the String that you are getting from the results?Might want to search the forum other similar topics like: http://forum.java.sun.com/thread.jspa?threadID=651378&messageID=3832110
zadoka at 2007-7-9 21:07:15 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 4
im getting the exception while retrieving the results using rset.next()and the maximum length of the string retrieved is 464
Sashi12aa at 2007-7-9 21:07:15 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 5

> im getting the exception while retrieving the results

> using rset.next()

>

> and the maximum length of the string retrieved is 464

Seems like this might be a driver issue, after looking at other similar topics. Sorry, I don't have any other suggestions.

zadoka at 2007-7-9 21:07:15 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 6
anyway thanks for trying man...
Sashi12aa at 2007-7-9 21:07:15 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...