Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
    Bookmark Topic Watch Topic
  • New Topic

Invalid column index

 
Aabha Varma
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Report post to moderator
I have written a procedure that returns me Ref cursor.
the object that i am returning is a table of records that have two columns. Both the record and the table is created permanently in db.

I am calling the procedure from java.
The procedure when run separately, gives me two rows with value.

Now when i take a result set of the cursor, and if i give rs.getInt(column name) it gives me an invalid column index.

But the resultset meta data gives me the information that there are two columns.
So now i am stuck as where to debug.

Can anybody help me out

Thanks in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65110
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
"Aabha MMT",

We're pleased to have you here with us on the Ranch, 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
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi check my reply .here.
 
    Bookmark Topic Watch Topic
  • New Topic