• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1075
  • Last Modified:

System.Oracle.OracleClient produces OCI-22063 error

We have a c# hosting service that connects to an Oracle database using System.Oracle.OracleClient. The Oracle Client installed on the server running our hosting service is 1010. A SQL statement is failing for us but it is not failing in Toad or SQL Tools. The error we receive is

System.Data.OracleClient
OCI-22063: reading negative value [-~] as unsigned

When we run the SQL statement in Toad or SQL Tools there is no value that comes anywhere close to "-~" in the data so I really do not know where this value comes from. Is there a compatibility issue with System.Oracle.OracleClient and the Oracle 1010 Client? We have no issue like this using the Oracle 8 Client.

The SQL statement that fails is:

SELECT TCUSER.*, ALTERNATE.USR_KEY AS ALT_KEY, ALTERNATE.USR_CODE AS ALT_CODE, ALTERNATE.USR_DESC AS ALT_DESC, ALUSER.ALU_EXDATE AS ALT_EXPIRES, EMPLOYEE.EMP_CODE, EMPLOYEE.EMP_NAME, EMPLOYEE.EMP_EMPLOD, EMPLOYEE.EMP_PRJ, EMPLOYEE.EMP_PRJ_NM, EMPLOYEE.EMP_FTHPRJ, EMPLOYEE.EMP_CHR, EMPLOYEE.EMP_CHR_CD, EMPLOYEE.EMP_FTH, EMPLOYEE.EMP_RAT, EMPLOYEE.EMP_RAT_CD, TCPROJ.PRJ_NAME, TCPROJ.PRJ_DESC, TCPROJ.PRJ_RAT, TCPROJ.PRJ_RATREQ, CHARGE.CHR_CODE, CHARGE.CHR_DESC, RATE.RAT_CODE, RATE.RAT_DESC, TCLANG.LNG_CULTURE, TEMPLATE.TPL_DESC FROM TCUSER LEFT JOIN ALUSER ON ALUSER.ALU_UID=TCUSER.USR_KEY LEFT JOIN TCUSER ALTERNATE ON ALTERNATE.USR_KEY=ALUSER.ALU_RUID AND (ALU_INDATE IS NULL OR ALU_INDATE <= '20111025') AND (ALU_EXDATE IS NULL OR ALU_EXDATE >= '20111025') AND ALU_OUTDATE IS NULL LEFT JOIN TEMPLATE ON TEMPLATE.TPL_KEY=TCUSER.USR_TPL LEFT JOIN EMPLOYEE ON EMPLOYEE.EMP_KEY=TCUSER.USR_EMP LEFT JOIN TCPROJ ON TCPROJ.PRJ_KEY=EMPLOYEE.EMP_PRJ LEFT JOIN CHARGE ON CHARGE.CHR_KEY=EMPLOYEE.EMP_CHR LEFT JOIN RATE ON RATE.RAT_KEY=EMPLOYEE.EMP_RAT, TCLANG WHERE TCLANG.LNG_KEY=TCUSER.USR_LNG AND TCUSER.USR_KEY=28
0
hmstechsupport
Asked:
hmstechsupport
  • 4
  • 4
1 Solution
 
sdstuberCommented:
you're misinterpreting the error message.

oci-22063 means your code is trying to convert a negative number to an unsigned integer.
0
 
slightwv (䄆 Netminder) Commented:
What version of the client was used to compile the app?

There are a lot of known issues when trying to mix and match .Net Oracle driver versions.
0
 
hmstechsupportAuthor Commented:
sdstuber, we know what the message means but there is no reason the SQL statement should fail based on an invalid negative number as 1. there are no negative numbers return by the SQL statement in Toad or SQL Tools and 2. It is impossible for the value "-~" to end up in a numeric field that we are joining or selecting.

slightwv, we do not compile our app with any Oracle Client. We reference the System.Oracle.OracleClient and the properties of this reference are:

Description: System.Oracle.OracleClient.dll
Runtime Version: v2.0.50.727
Version: 2.0.0.0

The System.Oracle.OracleClient just uses whatever Oracle Client is installed on the server which in this case is Oracle 10.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
slightwv (䄆 Netminder) Commented:
>>The System.Oracle.OracleClient just uses whatever Oracle Client is installed

It might not be version related but In my .Net/Oracle experience you really cannot mix and match Oracle client versions between what was 'refererenced' when compiled and what is installed then published.

I've not seen this specific error but here is a question from another Expert that talks about versions issues and app.config settings.


http://www.experts-exchange.com/Database/Oracle/Q_27020817.html
0
 
hmstechsupportAuthor Commented:
Hey slightwv, we do not reference any Oracle Client in our application. There isn't even an Oracle Client installed where we build the application.
0
 
slightwv (䄆 Netminder) Commented:

>>There isn't even an Oracle Client installed where we build the application

How do you test the app?
0
 
hmstechsupportAuthor Commented:
We build it and move it to a server where it is installed. Our application is designed to work on multiple database platforms (SQL Server, MySQL, and Oracle).
0
 
slightwv (䄆 Netminder) Commented:
I'm thinking you are hitting a bug with the 10.1 Oracle client.  If you have access to Oracle Support, I would probably with this with them.

I cannot find anything specific to that error and since you mention older Oracle clients work and 10.1 in early releases had a lot of bugs, you might be hitting one.

For what it's worth moving forward, Microsoft is dropping Oracle data providers and you will be forced to use Oracle native drivers.  I would suggest you go ahead and start using ODP.Net.
0
 
hmstechsupportAuthor Commented:
We aren't sure exactly what the resolution is. We have instructed our client to try a different version of the Oracle Client driver but have not heard if it resolves the issue.

I'm giving points to slightwv for being active in the thread and at least confirming the version 10 ODAC had bugs that we may be encountering.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now