Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Nube question: ODP and System.Data.OracleClient

486976Mar 6 2007 — edited Mar 13 2007
I'm new to Oracle and so I have some "stupid newbie" questions ... :-)

I am on a small team developing an app that must support access to a number of databases, including Oracle. We are using VS 2005 (VB and C#) and Oracle 10g Express, Release 10.2.0.1.0 - Beta (downloaded Jan-2006); running under WinXP SP2.

I see many things to download here: a bunch of cool stuff in ODT, and what looks like a replacement data provider in ODP. I'm just not sure what I need!

The .NET framework has System.Data.OracleClient, and I am indeed able to use that to access data in my 10g database. But certain queries executed through this fail with an Oracle error. These same queries can be run without problem in SQL*Plus ... so something seems not quite right. Specifically, when logged into the HR account, here's the query:

SELECT employee_id, last_name, salary / employee_id from employees

and the error message is: OCI-22053: overflow error

It works as is in SQL*Plus. It also works fine in my app if I add the values rather than divide (salary + employee_id).

Same goes for these queries:

SELECT last_name, salary, department_id, salary / department_id
from employees

SELECT job_id, avg(salary / employee_id)
from employees
group by job_id

SELECT job_id, avg(salary + department_id)
from employees
group by job_id

Note that the error occurs when the Fill method of the OracleDataAdapter is called. Given the values, it seems unlikely that a true overflow is occuring. Perhaps it is a data conversion issue??

I don't know what I'm doing wrong, but I thought it might be a provider issue. Note that MANY other queries work fine. I just seem to have this problem occur with some column expressions and/or column functions.

Basic question - is ODP in fact a replacement for OracleClient in the .NET framework? And will it work against 10g Express? ... and will it help with these errors? (he asked hopfully ... :-)

Thanks,

Emby
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 10 2007
Added on Mar 6 2007
5 comments
1,091 views