Oracle .net provider give special character problems

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.
acraig1Asked:
Who is Participating?
 
Bob LearnedConnect With a Mentor Commented:
What is the code that you use to add the parameters?

Bob
0
 
Bob LearnedCommented:
What is the field type for the database table?

Bob
0
 
acraig1Author Commented:
VARCHAR(6)
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Bob LearnedCommented:
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
 
acraig1Author Commented:
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
 
Bob LearnedCommented:
What are you using to write the data to the field?

Bob
0
 
acraig1Author Commented:
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
 
acraig1Author Commented:
cmd.Parameters.Add (attribName, OracleType.NVarChar,100);
0
 
acraig1Author Commented:
cmd.Parameters[attribName].Value = parameterValue;
0
 
Bob LearnedCommented:
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
 
acraig1Author Commented:
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
All Courses

From novice to tech pro — start learning today.