Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

System.Data.OracleClient caracters ª

Posted on 2010-11-11
2
Medium Priority
?
459 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 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
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…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Suggested Courses

609 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