This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC-SQL- resultset retreival

 
shailja mishra
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a problem.I got the user defined type of variale in MS SQL for a filed 'material_qty' the data type of the field is of type 'QTY' which is an integer.
when I an retieving it through rs.getInt('material_qty') then it gives an exception -'Invalid descriptor Index'.Can you please help me & let me know that how should I retrive such user defined data types.
Thanx in advance
Shailja
 
Shripad Bokil
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Pls first insure that the field 'material_qty' is an integer or String.If it is string field than use rs.getString otherwise try giving the column no.for the field 'material_qty' instead of its name. like...rs.getInt(1)...remember column index starts from 1 & not from 0.
Hope it works.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic