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

Home -> Community -> Usenet -> c.d.o.server -> Re: character set weirdness and .NET

Re: character set weirdness and .NET

From: Niall Litchfield <niall.litchfield_at_dial.pipex.com>
Date: 1 Dec 2004 03:50:34 -0800
Message-ID: <1101901834.497257.250900@f14g2000cwb.googlegroups.com>

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

Original text of this message

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