3 Replies Latest reply: Aug 16, 2013 12:57 AM by Invincible RSS

    Oracle Managed Provider: ORA-12537: Network Session: End of file

    Invincible

      I'm getting ORA-12537: Network Session: End of file when using Array binding with select statement, for Insert statement - works.

      Example:

                  using (var con = new Oracle.ManagedDataAccess.Client.OracleConnection(connectString))
                  {
                      con.Open();
                      using (var com = con.CreateCommand())
                      {
                          com.CommandText = commandBulkSelect;
                          var paramVal = new long[] {2132417624, 347508636, 690014466};
                          com.ArrayBindCount = paramVal.Length;
                          var p1 = new Oracle.ManagedDataAccess.Client.OracleParameter("p1", Oracle.ManagedDataAccess.Client.OracleDbType.Int64);
                          p1.Value = paramVal;
                          com.Parameters.Add(p1);
                          using (var reader = com.ExecuteReader())
                          {
                              while (reader.Read()) { }
                          }
                      }
                      con.Close();
                  }
      
      
      
      
      

      Where SQL is:

      string commandBulkSelect = @"select * from InsertTest where col1 = :p1";
      
      
      
      
      

       

      Table SQL is:

      CREATE TABLE "PHOENIX"."INSERTTEST"
      (
             "COL1" NUMBER(10,0),
             "COL2" VARCHAR2(100 CHAR),
             "COL3" DATE   
      )
      
      
      

       

      StackTrace:

         at OracleInternal.Network.ReaderStream.Read(OraBuf OB)

         at OracleInternal.TTC.OraBufReader.GetDataFromNetwork()

         at OracleInternal.TTC.OraBufReader.Read(Boolean bIgnoreData)

         at OracleInternal.TTC.MarshallingEngine.UnmarshalUB1(Boolean bIgnoreData)

         at OracleInternal.TTC.TTCExecuteSql.ReceiveExecuteResponse(Accessor[]& defineAccessors, Accessor[] bindAccessors, Boolean bHasReturningParams, SQLMetaData& sqlMetaData, SqlStatementType statementType, Int64 noOfRowsFetchedLastTime, Int32 noOfRowsToFetch, Int32& noOfRowsFetched, Int64& queryId, Int32 longFetchSize, Int32 initialLOBFetchSize, Int64[] scnFromExecution, Boolean& bAllPureInputBinds, DataUnmarshaller& dataUnmarshaller, MarshalBindParameterValueHelper& marshalBindParamsHelper, Boolean bDefineDone)

       

      This works with native client.