acraig1
asked on
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.
é = é
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.
ASKER
VARCHAR(6)
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
Bob
ASKER
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.
What are you using to write the data to the field?
Bob
Bob
ASKER
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.a dd method. This sql is working with all other types of data, not international characters.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
cmd.Parameters.Add (attribName, OracleType.NVarChar,100);
ASKER
cmd.Parameters[attribName] .Value = parameterValue;
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
I looked through some things, and I have to ask, as a test, if you could try this with the Oracle OleDb provider?
Bob
ASKER
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.
Bob