Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: character set weirdness and .NET
Greg Shaw wrote:
> I have been searching high and low without success.
> I have an Oracle 7 DB (stop laughing). I am not the DBA. It is
> what I have been given to work with. It's NLS_CHARACTERSET from
> NLS_DATABASEPARAMETERS is AL24UTFFSS. All the text columns
> are VARCHAR2.
> I read the data using OraOleDb.Oracle (the Oracle supplied OleDb
> provider) into a .NET program I have written.
> When I run the program on my development machine the text reads
> and displays properly. I had no idea I had a problem until I go to
> install it on a client machine and they get all text displayed
> as vertical bars. One guy even gets Chinese characters.
> I have built a WinXP environment for testing and it exhibits the
> problem.
when you create your connection it is likely that you will be able to write code like this (pseudo c# code from the top of my head but you get the idea)
Oledb.connection conn = new Oledb.connection;
conn.connectionstring = strconnect;
conn.open();
oledb.command cmd = new oledb.command;
cmd.commandtype = text; cmd.commandtext = "alter session set nls_characterset = 'AL24UTFFSS'"; cmd.executenonquery();Received on Wed Dec 01 2004 - 05:50:34 CST
![]() |
![]() |