Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

JDBC-SQL- resultset retreival

 
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
 
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.
 
You don't know me, but I've been looking all over the world for. Thanks to the help from this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!