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: Why? Oracle LONGVARCHAR Returning Wide Chars using ODBC "default" type

Re: Why? Oracle LONGVARCHAR Returning Wide Chars using ODBC "default" type

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Wed, 20 Apr 2005 16:04:28 +0200
Message-ID: <d45nad$9it$1@news2.zwoll1.ov.home.nl>


Jim Smith wrote:
> In message <42659588$1$avpx$mr2ice_at_news.east.earthlink.net>, Nick Knight
> <bhnc_140__at_mr2ice.com> writes
>

>> Hi,
>>
>> I've got a couple of different versions of Oracle servers (8 & 9) running
>> in-house as test platforms.  My software works very well with these
>> via ODBC
>> connections.  However, I've now hit my second install where
>> LONGVARCHAR data
>> is coming back as wide characters - Unicode.  I'm expecting single byte
>> ASCII; which is all I get from my machines.
>>

>
> What version is the database with the problem? In 9 and 10 you can
> specify either CHAR or BYTE semantics for character-type columns. e.g.
>
> name varchar2(10 char) or
> name varchar2(10 byte).
>
> Byte is the default and is equivalent to ASCII.
>
>

No - you can switch between char and byte semantics, you do not switch between charactersets.

And it is very well possible to get unicode characters from a varchar2(20 byte) column. It's just very unlikely you will get 20 characters, usually less.

-- 
Regards,
Frank van Bortel
Received on Wed Apr 20 2005 - 09:04:28 CDT

Original text of this message

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