Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top