3

I'm migrating a project from Mirosofts Oracle Provider (System.Data.OracleClient) to Oracles Data Provider ODP.Net (Oracle.DataAccess.Client), Version 11.2.0.4. The Problem I have right now is the following:

When I'm running a MERGE INTO Statement using the Function OracleCommand.ExecuteNonQuery it always returns -1, no matter if it was successful or not. Microsofts Provider always returns the number of affected rows. So this is what I expect from ODP.Net as well. But it only returns the number of affected rows for INSERT/DELETE/UPDATE Statements...

So how I can get this to work? Any ideas?

Cheers Christian

1 Answers1

2

This is a bug in ODP.NET, unfortunately.

If you are able to do this in anonymous PL/SQL or in a stored procedure, you could take advantage of PL/SQL's SQL%ROWCOUNT.

Christian Shay
  • 2,570
  • 14
  • 24
  • Still bugged, over 2.5 years later. >_> Is it at least entered as a bug anywhere that Oracle cares about? – jpmc26 Oct 31 '17 at 03:56