Solved

System.Data.OracleClient caracters ª

Posted on 2010-11-11
2
428 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle encryption 12 48
SQL2016 to ORACLE11G linked-server 6 28
FInd Image Control Gridview 3 21
call a controller action method from Global.asax in asp.net 1 20
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Via a live example, show how to take different types of Oracle backups using RMAN.

839 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