Dear all, I am facing a very strange problem. I made a simple program which connects to databse and return the lentgh of String. but length of String is comming wrong.........
below is my java code also output of console is pasted.
I am using classes12.zip to connect with oracle,and I have tried varios version of classes12.zip but result is same
Oracle Server is running on Solaris 9 and Oracle version is 126.96.36.199
My java program is runing on win 2000 professional.
anyone please suggest
/*************** Output *******************/
########### output With resulset ########### value of @strMode1 is >> E lenght of @strMode1 is >> 32 lenght of @strMode1 after trim is >> 1 value of rs.getString is >>E and lenght is >>32 value of rs.getString is >>E and lenght is >>32 Press any key to continue . . [ October 28, 2004: Message edited by: Shailesh Chandra ]
Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
here we haven't define any size for the column MODET. we are just using dual. So what i think, the default type of dual is CHAR not VARCHAR or VARCHAR2 and the default length is 32 character. therefore you are getting this result. but after trim it works fine. just try one more system.out.
then see whether the question mark is the second character in the printed string or 33rd character.
Originally posted by adeel ansari: What is the value of cusor_sharing before? and why it was not applied to emp table?
Value of cursor_sharing was SIMILAR !!!
however I identified the problem as every thing was working good at one of my client. but when some optimisation were madethen we started getting same problem which I was getting at my different client.
after comparing DB parameter we found parameter
cursor_sharing is changed to FORCED from EXACT.
then at my this client I checked the same paramteer
SELECT * FROM V$PARAMETER WHERE NAME ='cursor_sharing'
and value was similar at my end.
hope this will help to those who will face similar kind of problem.
problem was with SELECT 'E' From dual kind of query