Solved

System.Data.OracleClient caracters ª

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

708 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now