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...
subject: TYPE_SCROLL_INSENSITIVE corrupts the result set data