• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

help!! ResultSet error

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
help! I get an Unexpected Exception: java.lang.ArrayIndexOutOfBoundsException message given: 65603 on the line rs=stmt.executeQuery(sqlString). where sqlString="SELECT * from <table>". The table that I query has a column that is of "text" type. my database is MySQL.
what's the problem with this? is it the jdbc driver that i use?
 
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Send the full code
 
yashko yashko
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Connection conn = DBConnnector.getConnection();
Statement stmt=conn.createStatement();
String sql="SELECT * from article";
ResultSet rs;
try{
rs=stmt.executeQuery(sql);
}catch(Exception ex){
ex.printStackTrace();
}
/*********************************
Sorry, but this is only what I can show. DBConnector
is a class where I get the Connection to the database.
My database is MySQL. In the table article, I have a
column of "text" type.The actual code is very much like
this. The exception was thrown at rs=stmt.executeQuery(sql);
*********************************/
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
have you tried running this code by seleting just a single column from the your table.
try this out and see if you code can handle this.
 
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"yashko yashko",
We're pleased to have you here with us in the JSP forum, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
Thanks!
bear
Forum Bartender
 
reply
    Bookmark Topic Watch Topic
  • New Topic