Unicode and long data type

  • Thread starter Thread starter Tom_Foran
  • Start date Start date
T

Tom_Foran

I have an application where a limited amount of Unicode data is being
inserted into a long data type field by an AIX program. I have written
a dotnet program that copies the data from one domain to another with
parameterized data. Everything works except for the Unicode data in the
long field.

My Characterset info is:

NLS_CHARACTERSET US7ASCII
NLS_NCHAR_CHARACTERSET AL16UTF16

Regional Settings are

English (United States)
A basic default U.S. installation of Windows.

I do not have much control over the database.

I have read that long data types do not support Unicode.

Is there anyway I can insert Unicode data into a long data type from a
dotnet program?
 
Ah, a Long is an integer type. The SQL Server equivalent is a BigInt that
can store up to 8 bytes (64 bits) of data. It can store any number within
its range (about 2^63). A Unicode type is a character type (16
bits/character). There is no way to store a Unicode value (more than 4 16bit
characters) into a Long (big int). You can convert a few characters into
their hex equivalent and store that...

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
 
I forgot to mention this is an Oracle database. Oracle has a text data
type call Long. My understanding is that the Oracle long data type is
not used too much any more, but the vendor database I am using has a
few fields of long data type.

Tom
 
Back
Top