Solved

System.Data.OracleClient caracters ª

Posted on 2010-11-11
2
440 Views
Last Modified: 2012-08-13
Hello,

We have the next problem:

We have a application in VS2010 with Framework 3.5
We use System.Data.OracleClient

The application work sucesfully, but when we read some caracters of oracle database, we obtained ????

For example with the caracter ª we obtain ?

We don't install Oracle client in the clients.
If we install Oracle client in the clients then we obtain the caracter sucesfully.

But our goal is don't install oracle client in each client.

What can I do?

Thanks.
0
Comment
Question by:david-shm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 6

Accepted Solution

by:
Greg Clough earned 500 total points
ID: 34111443
You need to check the NLS_LANG settings on your client, which I'm presuming is windows. This must match whatever your PC "codepage" is set to. Check in the registry for HKLM/Sofware/Oracle, and it may be something like:AMERICAN_AMERICA.WE8MSWIN1252Then you need to ensure that your database can store the character you're trying to store. I presume you're running AL32UTF8?  You can check this by querying:SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ;
0
 
LVL 6

Expert Comment

by:Greg Clough
ID: 34111604
Actually, the fact that your database is returning "?" for unknown characters almost positively identifies it as a US7ASCII database, which was the default for a long time. This means that you can only store characters in the 7-bit range, which is basic a-zA-Z0-9, etc.If you want to store extended Ascii, or other languages that need other characters (À, Ø, ®, etc.) then you need to switch to a new database character set. The easiest decision, and the most future proof is AL32 UTF8. There are implications on database size, but you'll need to be informed about what your exact requirements are before make the switch.WARNING: Do not set your NLS_LANG on your Client to match your Database. This will bypass the character translation code built into Oracle, and will cause you pain in the future. It may appear to work, but you'll be storing corrupt data. The only time the NLS_LANG on your Client should match the Database is when the client is actually running the same characterset. (I'm sure there's some cyclical logic in there, but hopefully it's clear)
0

Featured Post

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question