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 -> .net OracleClient and character sets

.net OracleClient and character sets

From: HaukiDog <HaukiDog_at_hotmail.com>
Date: 2 May 2003 14:22:47 -0700
Message-ID: <6d3bc6d9.0305021322.488a3c39@posting.google.com>


I have developed some code on an oracle server set to the US7ASCII character set. I just found out that my production system is set to UTF8. Changing character sets on the production server is not an option. There is a string in my member table, which contains some wacky characters and is not converting properly.

Is there any way to:
1. do a conversion in the select statement, or in an SP? 2. is there anyway to chnage the character set in the OracleClient code?

I am using an OracleDataReader, the code looks like this:



const string _selectText = "SELECT passwordkey FROM member WHERE memberid=:pMemberId";
OracleCommand myCommand = new OracleCommand();
myCommand .Connection = _Connection;
myCommand .CommandType = CommandType.Text;
myCommand .CommandText = _selectText;

OracleDataReader myReader =
myCommand.ExecuteReader(CommandBehavior.SingleRow);

if (!myReader.Read())
{
  throw new UserUnknownException(UserId); }

int passwordkeyOrdinal = myReader.GetOrdinal("passwordkey"); string PasswordKey = myReader.GetString(passwordkeyOrdinal );


Thanks! Received on Fri May 02 2003 - 16:22:47 CDT

Original text of this message

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