7

Why does not Oracle ODP recognize the parameter Unicode=true and Devart's Provider does?

WHen I have data containing the string : "ñãõ,éóúý" , my asp.net application shows "???,????" if I'm using Oracle's ODP. WHen I try to put the attribute Unicode=true in the connectionstring, it says that it's an invalid attribute.

THe same behavior can be reproduced with Devart's provider. But it happens that when I place the Unicode=true attribute in the connectionstring everything is displayed nicely on the screen of my asp.net application.

Why does that happen? Which attribute could I use in Oracle Data Provider (Oracle.DataAccess.Client) so that I can have my characters shown the way I want?

dee-see
  • 23,668
  • 5
  • 58
  • 91
ClayKaboom
  • 1,833
  • 1
  • 22
  • 42
  • 1
    Have you looked at Oracle's Globalization features? See: http://docs.oracle.com/cd/E11882_01/server.112/e10729.pdf Also, take a look at the NLS_LANG environment variable. – RMAN Express Apr 03 '13 at 17:27
  • I've seen it. But I'd like to know if is there any parameter in my connectionstring that can be used to solve the problem. It has worked ever since we used Devart. We are intending to change to Oracle provider in .net but this character stuff in some applications is failing. – ClayKaboom Apr 05 '13 at 13:53
  • @ClayKaboom why are you intending to change to odp? – evgenyl Apr 07 '13 at 11:20
  • We don't want to depend on third party components (and pay for that) . I was thinking that the communication of Oracle COmponents with Oracle Database would be smoother than using other manufacturers' products. – ClayKaboom Apr 07 '13 at 23:29
  • I think, devart has some free component. Also, you will find yourself with some limitations of odp.net - like osp.net see only one oracle jome, so if you have several, and want to use tnsnames - you will not be able. As well - you have to install odac on your customers machine... (Disclaimer: I have no relations to DevArt, we just thinking about switching from Odp.Net to Devart free component). – evgenyl Apr 14 '13 at 05:31
  • 3
    The "Update the Connection String" section of http://www.oracle.com/technetwork/topics/dotnet/code-154692.html says this about the `Unicode` parameter: "This setting is unnecessary because ODP.NET is always Unicode aware". Are you sure that ODP.NET is to blame and not the encoding of your page? – dee-see Jan 21 '15 at 21:03

1 Answers1

2

ODP.NET is always Unicode aware, says this link:

http://www.oracle.com/technetwork/topics/dotnet/code-154692.html

There is no need in using UNICODE in the connection string. In fact, this attribute should be removed.

Probably if the string is wrong ODP.Net is not the thing to blame.

Thanks @Vache for your comment.

ClayKaboom
  • 1,833
  • 1
  • 22
  • 42