This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes JDBC-SQL- resultset retreival Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC-SQL- resultset retreival" Watch "JDBC-SQL- resultset retreival" New topic

JDBC-SQL- resultset retreival

shailja mishra

Joined: Mar 06, 2001
Posts: 5
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
Shripad Bokil

Joined: Jan 30, 2001
Posts: 13
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. column index starts from 1 & not from 0.
Hope it works.
I agree. Here's the link:
subject: JDBC-SQL- resultset retreival
Similar Threads
How to pass class object in call to pl/sql procedure ?
Type Definitions in java
org.hibernate.MappingException: Could not determine type for...
Result Set problems
parsing in servlet