 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Vincent Yau Guest
|
Posted: Mon Jul 07, 2003 4:18 pm Post subject: Strange problem |
|
|
Dear All:
I have used MySQL as prototype on an application that I am developing.
The project has been
approved and I am now moving to Oracle for the production run. I have a
section
that deals with user password. My front end is in JSP/Servlet using
Apache tomcat and talking
to Oracle 8i using JDBC driver from Oracle (but I am using the Oracle 9i
driver).
The user password, I am using MD5 hashes and storing the string copy of
that hashes onto the database (as varchar).
MySQL was ok. However, when I moved the application to talk to Oracle,
I am always getting a different string back
from the database than what I am saving into it. However, I am
always getting back, from ORacle, the same
set of characters. So it was consistently different but consistently in
the same format. So I think there
are some character conversion that is happening. Some of the
characters are non-printable characters so
they look like rubbish. But you can still compare with your bare eyes
as the strings always contain the
same set of characters.
I think I am missing something as to how Oracle handle non-printable
character strings.
Any help much appreciated!!
Please email me as well as posting back to the newsgroup.
Thanks
--Vincent
[email]yauv (AT) ohsu (DOT) edu[/email]
|
|
| Back to top |
|
 |
Chuck Guest
|
Posted: Mon Jul 07, 2003 5:56 pm Post subject: Re: Strange problem |
|
|
Try a binary datatype for that column. RAW should work.
Vincent Yau <yauv (AT) ohsu (DOT) edu> wrote in news:3F099D49.BDDAAE5E (AT) ohsu (DOT) edu:
| Quote: | Dear All:
I have used MySQL as prototype on an application that I am developing.
The project has been
approved and I am now moving to Oracle for the production run. I have
a
section
that deals with user password. My front end is in JSP/Servlet using
Apache tomcat and talking
to Oracle 8i using JDBC driver from Oracle (but I am using the Oracle
9i
driver).
The user password, I am using MD5 hashes and storing the string copy of
that hashes onto the database (as varchar).
MySQL was ok. However, when I moved the application to talk to Oracle,
I am always getting a different string back
from the database than what I am saving into it. However, I am
always getting back, from ORacle, the same
set of characters. So it was consistently different but consistently
in
the same format. So I think there
are some character conversion that is happening. Some of the
characters are non-printable characters so
they look like rubbish. But you can still compare with your bare eyes
as the strings always contain the
same set of characters.
I think I am missing something as to how Oracle handle non-printable
character strings.
Any help much appreciated!!
Please email me as well as posting back to the newsgroup.
Thanks
--Vincent
[email]yauv (AT) ohsu (DOT) edu[/email]
|
|
|
| Back to top |
|
 |
Blue Jean Guest
|
Posted: Tue Jul 08, 2003 5:20 pm Post subject: Re: Strange problem |
|
|
Perhaps you should convert the binary hash to Hex string
and then save it to the database as varchar.
This way, it should have no problem with any database systems.
(this is how I do, but don't know about other people)
_________________________________
Bugzero all-in-one: bug tracking & help desk
Free try: http://www.websina.com/bugzero/
Vincent Yau <yauv (AT) ohsu (DOT) edu> wrote
| Quote: | Dear All:
I have used MySQL as prototype on an application that I am developing.
The project has been
approved and I am now moving to Oracle for the production run. I have a
section
that deals with user password. My front end is in JSP/Servlet using
Apache tomcat and talking
to Oracle 8i using JDBC driver from Oracle (but I am using the Oracle 9i
driver).
The user password, I am using MD5 hashes and storing the string copy of
that hashes onto the database (as varchar).
MySQL was ok. However, when I moved the application to talk to Oracle,
I am always getting a different string back
from the database than what I am saving into it. However, I am
always getting back, from ORacle, the same
set of characters. So it was consistently different but consistently in
the same format. So I think there
are some character conversion that is happening. Some of the
characters are non-printable characters so
they look like rubbish. But you can still compare with your bare eyes
as the strings always contain the
same set of characters.
I think I am missing something as to how Oracle handle non-printable
character strings.
Any help much appreciated!!
Please email me as well as posting back to the newsgroup.
Thanks
--Vincent
[email]yauv (AT) ohsu (DOT) edu[/email]
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|