Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Oracle .net provider give special character problems

Posted on 2004-04-07
11
Medium Priority
?
493 Views
Last Modified: 2008-02-07
When storing special characters in an Oracle table using the Microsoft Oracle .net provider the characters are being translated.  The special characters are any that have an accent or an umlaut.  The translations are consistent with each character entered.  The example below is one of the translations.
é = é

We could switch to the Oracle .net provider, but that would require substantial effort, and I am not sure it would fix the problem.

Please advise.
0
Comment
Question by:acraig1
  • 6
  • 5
11 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 10777415
What is the field type for the database table?

Bob
0
 

Author Comment

by:acraig1
ID: 10778060
VARCHAR(6)
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 10778116
In SQL Server there is a field type nVarChar that can handle international characters.  Would it be an option to change the field type?  Does Oracle have that option?

Bob
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:acraig1
ID: 10778316
Oracle is handling the international characters fine if we insert them via SQL+ or Toad.  When we insert via the .net data provider we get the jumbled results.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 10778435
What are you using to write the data to the field?

Bob
0
 

Author Comment

by:acraig1
ID: 10778467
I am using sql assigned to the CommandText of the OracleCommand object, and I am using bind variables to populate the data using the OracleCommand.Parameters.add method.  This sql is working with all other types of data, not international characters.
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 750 total points
ID: 10778481
What is the code that you use to add the parameters?

Bob
0
 

Author Comment

by:acraig1
ID: 10783552
cmd.Parameters.Add (attribName, OracleType.NVarChar,100);
0
 

Author Comment

by:acraig1
ID: 10783569
cmd.Parameters[attribName].Value = parameterValue;
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 10783914
Wow, I don't understand why this would be doing this to you!

I looked through some things, and I have to ask, as a test, if you could try this with the Oracle OleDb provider?

Bob
0
 

Author Comment

by:acraig1
ID: 10784941
The problem was with the addition of the parameters.  Your prompting me to look in that direction made me look into each of the available types.  Updating from nVarChar to just VarChar fixed the problem.  After more research I discovered the n in nVarChar stands for national.  So, I am guessing VarChar is international.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying 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

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Suggested Courses

927 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