• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Updatable ResultSet - getString works but getObject does not??

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am creating an updatable resultset and then going thru it to read the values in each row. When I use getObject() to get the column values for each row, I get nulls. However, when I use getString(), I get the correct values.
Also, if I create a regular statement, not using the updatable result set feature, the getObject() call works fine.

Why would this be happening? (code below)

Thanks
Shailan




[edited to add code tags]
[ December 07, 2004: Message edited by: Jeanne Boyarsky ]
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Shailan,
What is the type of the database field? Also, what database are you using?
 
Shailan Mm
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jeanne

Im using Oracle8i Enterprise Edition Release 8.1.6.0.0

The query does a select * from a table with the following field types. (all Nullable)

Type
------------
VARCHAR2(3)
VARCHAR2(5)
VARCHAR2(3)
VARCHAR2(6)
VARCHAR2(1)
VARCHAR2(6)
DATE
VARCHAR2(1)
VARCHAR2(2)
DATE
DATE
VARCHAR2(8)
VARCHAR2(20)
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is an interesting question.
I will try to duplicate the problem and figure out the reason if I have time.

Please also report back if you figure out the reason.


Jim
 
Jeanne Boyarsky
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Shailan,
Strange. You are using Oracle's JDBC driver, right?
 
Shailan Mm
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yup. oracle.jdbc.driver.OracleDriver.
 
Shailan Mm
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Has anyone else encountered this behavior?

Thanks
Shailan
 
reply
    Bookmark Topic Watch Topic
  • New Topic