2 Replies Latest reply: Sep 2, 2010 2:05 PM by 607075 RSS

    OverFlowException on Oracle ODBC RowCount

    607075
      Hi,

      I'm using NHibernate to select an entity from an Oracle database through ODBC.

      This works fine on a 32bit system, but on x64 the following error occurs: It seems the rowcount is not in a correct format?

      I've running from a 64bit Application, on a 64bit (duh) Win7, ODBC connections were managed in the 64bit ODBC manager.

      Arithmetic operation resulted in an overflow.

      at System.Data.Odbc.OdbcStatementHandle.RowCount(SQLLEN& rowCount)
      at System.Data.Odbc.OdbcDataReader.GetRowCount()
      at System.Data.Odbc.OdbcDataReader.FirstResult()
      at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
      at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
      at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
      at System.Data.Odbc.OdbcCommand.ExecuteDbDataReader(CommandBehavior behavior)
      at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()

      Now, I am running this through NHibernate, so I'm not sure wether the RowCount is default behaviour of the OdbcDataReader or invoked by NHibernate.

      Either way, running a rowcount should not crash?

      Any help on the subject is very welcome...

      Edited by: user604072 on 2-sep-2010 11:02
        • 1. Re: OverFlowException on Oracle ODBC RowCount
          gdarling - oracle
          Thats a known issue - bug 9793452 .

          It's not NHibernate invoking rowcount, its the .NET framework.

          If I recall correctly, there's a patch available for 11.2 in the latest patch levels.
          Backports to 10204 and 10205 are in progress.
          The behavior doesnt occur on 11107.

          Hope it helps,
          Greg
          • 2. Re: OverFlowException on Oracle ODBC RowCount
            607075
            Yes it helps, thanks :)
            However, I am not really familiar with ODBC to Oracle.

            I hope the patches you're talking about are not related to the server, but to the client drivers?
            I'm not sure if I can convince my client to upgrade or patch their servers.

            If a new driver download would fix the issue, where should I looking? Can you give me some more pointers on how exactly to fix the issue?

            Thanks very much, I've been posting this question around, and it's the first answer to it :)...