Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Oracle .net provider give special character problems

Posted on 2004-04-07
11
Medium Priority
?
492 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
[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
  • 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

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…
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

688 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