Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Array Index outbounds error!? Please help!

 
Yuta Lolap
Ranch Hand
Posts: 86
Eclipse IDE Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all, i am running the above code in netbeans.

Getting the following error:






My database is as follows. I have given the right datatype as well as a lot of storage too! i still wonder why it is giving me that error.


SQL> desc customers;
Name Null? Type
----------------------------------------- -------- ----------------------------
CUSTOMER_ID NOT NULL VARCHAR2(10)
FNAME NOT NULL VARCHAR2(50)
MNAME VARCHAR2(50)
LNAME NOT NULL VARCHAR2(50)
ADDRESS VARCHAR2(50)
CONTACTNO VARCHAR2(10)
 
Campbell Ritchie
Sheriff
Posts: 48642
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you get that exception with (5) it means you are trying to access the No 5 (i.e. 6th) member of a 5‑element, or smaller, array. That array might be hidden inside an ArrayList or similar class. Use the stack trace to work out whereabouts in the code it happened.
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Your query is working with 5 parameters, and you're setting 6 of them (lines 160 - 167 of your code). From it, I guess you are missing customerid in your query (and corresponding '?' for it).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic