Major BUG in OraClient library.

  • Thread starter Thread starter max_menon
  • Start date Start date
M

max_menon

I have discovered a major problem with the OraClient
library.

The problem is easily reproduced in the following manner.
I am hoping Microsoft folks read this.

Say, for instance I have a table (Customers) consisting of
CustomerName and CustomerState:

CustomerName CustomerState
---------------------------
ABC Inc. California
XYC Inc. Texas
LHS Inc. Texas
RET Inc. Florida
DAC Inc. Texas
TYR Inc. Texas
NBC Inc. Florida
POQ Inc. Florida
ABT Inc. California

If I do a SELECT CustomerName, CustomerState FROM
Customers using the *ODBC* connection, I get the results
as expected.

However, if I run the same through the OraClient Data
Provider, here is what I get !!

CustomerName CustomerState
---------------------------
ABC Inc. California
XYC Inc. Texas
LHS Inc. Te
RET Inc. Florida
DAC Inc. Texas
TYR Inc. Te
NBC Inc. Florida
POQ Inc. Fl
ABT Inc. California

Whenever a subsequent row has identical data for a column,
it truncates the data ! I have two different versions of
OraClient (1.3 and 1.5, I think) ... and it does this on
both. On occasions, it will put non-ascii characters after
the "Te". Also, it does not always truncate the same
number of characters - at times it will display "Tex"
instead of "Te".

Keeping everything the same, if I switch to the ODBC
connection string, the results are fine !

I found this out after I had completed 70% of a major
project. I am not looking forward to moving back to using
ODBC. Please help.

max_menon
 
I have discovered a major problem with the OraClient
library.

The problem is easily reproduced in the following manner.
I am hoping Microsoft folks read this.

Say, for instance I have a table (Customers) consisting of
CustomerName and CustomerState:

CustomerName CustomerState
---------------------------
ABC Inc. California
XYC Inc. Texas
LHS Inc. Texas
RET Inc. Florida
DAC Inc. Texas
TYR Inc. Texas
NBC Inc. Florida
POQ Inc. Florida
ABT Inc. California

If I do a SELECT CustomerName, CustomerState FROM
Customers using the *ODBC* connection, I get the results
as expected.

However, if I run the same through the OraClient Data
Provider, here is what I get !!

CustomerName CustomerState
---------------------------
ABC Inc. California
XYC Inc. Texas
LHS Inc. Te
RET Inc. Florida
DAC Inc. Texas
TYR Inc. Te
NBC Inc. Florida
POQ Inc. Fl
ABT Inc. California

Whenever a subsequent row has identical data for a column,
it truncates the data ! I have two different versions of
OraClient (1.3 and 1.5, I think) ... and it does this on
both. On occasions, it will put non-ascii characters after
the "Te". Also, it does not always truncate the same
number of characters - at times it will display "Tex"
instead of "Te".

Keeping everything the same, if I switch to the ODBC
connection string, the results are fine !

I found this out after I had completed 70% of a major
project. I am not looking forward to moving back to using
ODBC. Please help.

You could switch to ODP.NET, which is Oracle's own .NET provider,
which has more functionality and is faster. It will take a bigger client
side installation, but working with Oracle most of the time requires that
anyway.

FB
 
Hey, guys. You might want to do some SERIOUS testing with ODP before you
use it in a project. My company is currently using it. However, we're
looking at changing to the MS provider or SQL altogether.

The ODP provider spontaneously throws a -3000 error for no apparent reason.
the problem with this is that if it happens, you have to kill you
aspnet_wp.exe process since the entire server freezes.
 
David Jessee said:
Hey, guys. You might want to do some SERIOUS testing with ODP before you
use it in a project. My company is currently using it. However, we're
looking at changing to the MS provider or SQL altogether.

The ODP provider spontaneously throws a -3000 error for no apparent reason.
the problem with this is that if it happens, you have to kill you
aspnet_wp.exe process since the entire server freezes.

Yes this is a known bug in the 9.2.0.2.102 version of ODP.NET.
The 9.2.0.4.0 version (currently in beta) resolved this issue for me.

David
 
Max,
The reason why your results look fine when using ODBC is probably because
you used a non unicode enabled provider to insert data into a UTF8 Oracle
server. If this is your current setup please continue reading, if not then
please post more information about your setup. Framework used, Oracle Client
and Server used and NLS LANG setting. Please also post your table schema.

If you are using UTF8 the problem is not that you are receiving corrupted
data , the problem is that you are inserting invalid utf8-data. It is
fairly simple to insert invalid utf8 data into Oracle since sqlPlus needs to
be properly configured and older providers like our MSDAORA do not provide
unicode support
http://support.microsoft.com/default.aspx?scid=KB;EN-US;244661


To verify this you can try the following:

Insert into EMP (Empno, Ename) values (1000, 'àèé')

Once you have done this with both the Oracle managed provider and either
sqlplus or msdaora you can get the real values stored in the database like
this:

select dump(ename, 1016) from emp;

DUMP(ENAME,1016)

----------------------------------------------------------------------------
----

Typ=96 Len=10 CharacterSet=UTF8: e0,e8,e9,20,20,20,20,20,20,20 //invalid
utf-8 value inserted with msdaora

Typ=96 Len=10 CharacterSet=UTF8: c3,a0,c3,a8,c3,a9,20,20,20,20 //àèé
inserted with Oracle managed provider.

If you have entered invalid utf8 data into your database with a non unicode
provider then you can only read the data out with a non unicode provider.
Switching to ODP.net will not solve your problem.
Hope this helped,
 
max_menon said:
I have discovered a major problem with the OraClient
library.

The problem is easily reproduced in the following manner.
I am hoping Microsoft folks read this.

Say, for instance I have a table (Customers) consisting of
CustomerName and CustomerState:

CustomerName CustomerState
---------------------------
ABC Inc. California
XYC Inc. Texas
LHS Inc. Texas
RET Inc. Florida
DAC Inc. Texas
TYR Inc. Texas
NBC Inc. Florida
POQ Inc. Florida
ABT Inc. California

If I do a SELECT CustomerName, CustomerState FROM
Customers using the *ODBC* connection, I get the results
as expected.

However, if I run the same through the OraClient Data
Provider, here is what I get !!

CustomerName CustomerState
---------------------------
ABC Inc. California
XYC Inc. Texas
LHS Inc. Te
RET Inc. Florida
DAC Inc. Texas
TYR Inc. Te
NBC Inc. Florida
POQ Inc. Fl
ABT Inc. California

Whenever a subsequent row has identical data for a column,
it truncates the data ! I have two different versions of
OraClient (1.3 and 1.5, I think) ... and it does this on
both. On occasions, it will put non-ascii characters after
the "Te". Also, it does not always truncate the same
number of characters - at times it will display "Tex"
instead of "Te".

Keeping everything the same, if I switch to the ODBC
connection string, the results are fine !

I found this out after I had completed 70% of a major
project. I am not looking forward to moving back to using
ODBC. Please help.

max_menon

OpenLink Software has just released new Managed and Unmanaged .NET
Providers that will connect you to Oracle (and other databases).

These providers will connect you directly to Oracle via a database
independent communications layer (Multi-Tier Edition) or indirectly
via a an ODBC.NET provider (from OpenLink as opposed to Microsft)
which sits atop our Single-Tier or any other 3rd party ODBC Driver for
Oracle.

These data providers are available for download from
http://www.openlinksw.com on a free 30 evaluation basis.
 
Back
Top