GeeCON Prague 2014*
The moose likes Oracle/OAS and the fly likes Oracle database reading from table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Oracle database reading from table" Watch "Oracle database reading from table" New topic
Author

Oracle database reading from table

Anand Loni
Ranch Hand

Joined: Jan 20, 2006
Posts: 150
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,


~ Anand,
SCJP 1.5, SCWCD 1.5
Fatih Keles
Ranch Hand

Joined: Sep 01, 2005
Posts: 182
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

Joined: Jan 20, 2006
Posts: 150
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

Joined: Sep 01, 2005
Posts: 182
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

Joined: Jan 20, 2006
Posts: 150
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.
 
GeeCON Prague 2014
 
subject: Oracle database reading from table