Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TYPE_SCROLL_INSENSITIVE corrupts the result set data

 
Manju Krishna
Ranch Hand
Posts: 48
1
  • Mark post as helpful
  • send pies
  • 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
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • 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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic