Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Finding element at a particular row in a column.

 
Ankit Tripathi
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have found a element at the cross of a particular row at a particular column.For Ex.at the cross of 3rd column and 2nd row.
Now how I can find other element in some other column at same row no?

I can find a particular element in ResultSet and row no. of that element one-by-one like that-



Now I am not getting how to find an element at same row index in some other column...
 
Ankit Tripathi
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can sonebody please look here.....
 
prateek sharmaa
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ankit,

you can do following two things :

// Get the data from the row using the column index
String s = rs.getString(1);

// Get the data from the row using the column name
s = rs.getString("col_string");

if you know the next column number then you can use the first option or if you know the next column name you want to fetch then you can use the second option.

thanks,
pratz

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic