ORA-3113 or ORA-03120 using ODP.NET with RETURN clause

(Doc ID 762710.1)

Last updated on JULY 05, 2017

Applies to:

Oracle Data Provider for .NET - Version to
Microsoft Windows (32-bit)
Microsoft Windows x64 (64-bit)
***Checked for relevance on 22-Jun-2017***


***Checked for relevance on 06-Jul-2010***

An ODP.Net application using the RETURN .. INTO clause with at least one input bind variable in an update statement fails with the following error :

ORA-3113 end-of-file on communication channel


ORA-03120: two-task conversion routine: integer overflow error

Example of failing code :

using System;
using Oracle.DataAccess.Types;
using Oracle.DataAccess.Client;
using System.Collections.Generic;
using System.Text;

namespace returninto
    class Program
        static void Main(string[] args)
          OracleConnection conn = new OracleConnection(); 
          conn.ConnectionString = "Data Source=ORCL;User ID=SCOTT; Password=\"tiger\""; 

          using (conn) 
             OracleCommand cmd = new OracleCommand(); 
             cmd.Connection = conn; 
             cmd.CommandText = @"update emp 
                                 set    empno = '7900' 
                                 where  ename=:ename 
                                 return empno 
                                 into   :ret1"; 

             cmd.Parameters.Add("ename", OracleDbType.Varchar2); 
             cmd.Parameters["ename"].Value = "JAMES"; 
             cmd.Parameters["ename"].Direction = System.Data.ParameterDirection.Input; 

             cmd.Parameters.Add("ret1", OracleDbType.Decimal); 
             cmd.Parameters["ret1"].Direction = System.Data.ParameterDirection.Output; 

             catch(System.Exception ex)
                System.Console.WriteLine("Failed execute query : {0}.", ex.Message);


The same  problem occurs using the Microsoft .Net Provider for Oracle (System.Data.OracleClient) as well.

Problem did not occur using


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms