Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle database reading from table

 
Anand Loni
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a table which stores 7 chars string key which will be read by application for validation. The problem I am facing is, I am not able to validate key if it contains alphanumeric and special characters (example: oFemT7M). If I change key to all numeric say 1111111 then validation works fine.

Is this related to character encoding or something else ? I checked my prod database with dev and only difference I can see in time zone. Prod database has timezone as America and Dev database is having Asia.

Any idea what could be the issue ?

Regards,
 
Fatih Keles
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anand,

What do you mean by "I can not validate"? What is validation process? Some code will do better.

Regards,
Fatih.
 
Anand Loni
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Fatih,

We have 7 single char text boxes on the UI, when user enters value in those and clicks on submit, we are concatinating 7 chars from text boxes and sending those to service. Service will validate this 7 chars string with string from database, if it matches then validation is successful and user is allowed to proceed further.

Here is code snippet from action class:



I hope I am able to explain my problem.

Regards,
 
Fatih Keles
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if pKey.getKey() returns String then it is string comparison, I doubt that is because you prefer all letters or numerical characters. What is the value you retrieve from database?
 
Anand Loni
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.. pKey.getKey() returns String. I don't know the value retrieved from database. But I am sure that database value is same as value entered from UI, as I checked production database table.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic