• 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

TYPE_SCROLL_INSENSITIVE corrupts the result set data

 
Ranch Hand
Posts: 48
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

When i execute a query without any parameters in createStatement like,

stmt = con.createStatement();

and execute the query, the resul gets printed out correctly..

but if I set it like,

stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);

and execute.. it prints out "???" when Resultset is iterated..

Can anyone help on this?
Thanks in adavance
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you sure that your database supports TYPE_SCROLL_INSENSITIVE? Not all of them do.

What database are you using?
 
Manju Krishna
Ranch Hand
Posts: 48
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I m using Oracle 9i..

I found that the query was working fine in our local DB.. but failing in remote DB..
Also found the character set definition to be different in local and remote..

One strange behaviour was... in Remote DB.. If i used a createStatement without the result set type and concurency.. like
stmt = con.createStatement; then the result set returned correct data.. It returns "???" only if i use TYPE_SCROLL_INSENSITIVE and CONCUR_READ_ONLY... Why is this so ??

Moreover.. the local DB was able to return correcly for the same data.. whatever may be the createStatement parameters...
 
I love a woman who dresses in stainless steel ... and carries tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic