Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: storing byte values

Re: storing byte values

From: <pascal.dulleck_at_veda.net>
Date: Tue, 07 Aug 2007 07:44:45 -0700
Message-ID: <1186497885.316099.125510@b79g2000hse.googlegroups.com>


Thanks for your answers, but they are not very helpful... ;-)

I can't explain the data model or the business plan, because it's not my model or plan. I need to migrate any existing database (within certain rules, of course) and it needs to work with an existing application.

So... is there a way to store byte values and to define a unique constraint which includes the column with the byte values? It would be sufficient to use a CHAR or VARCHAR column, if all possible bytes would be returned unchanged. But even with NCHAR there seems to be data loss, because some bytes seem to be unbound in the used character set. For example: when writing the character 0x80 into an NCHAR column and reading it again, the returned value is 0xBF. The same goes for 26 other bytes. They all get converted to 0xBF. Do I have to pay attention to something special when using NCHAR?

By the way, I'm using JDBC to connect to the database. I insert the values as string parameters of an PreparedStatement, so they should arrive as unicode strings in the database. Received on Tue Aug 07 2007 - 09:44:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US