title: OdbcDataAdapter Fill throws OverflowException Arithmetic operation resulted in an overflow
body: <p>I try to retrieve data from db2 using OdbcDataAdapter and this code works perfectly in my old machine (Windows 7 32 bit, VS2010)</p>
  
  <pre><code>public DataSet GetDataSet(string sql, string connstr)
  {
      using (OdbcConnection cn = new OdbcConnection(connstr))
      {
          using (OdbcCommand cmd = new OdbcCommand(sql, cn))
          {
              OdbcDataAdapter adapter = new OdbcDataAdapter(cmd);
              DataSet ds = new DataSet();
              adapter.Fill(ds);
              return ds;
          }
      }
  }
  </code></pre>
  
  <p>However, when I start a new project in my new machine (Windows 64 bit, VS2013) using the same code. I got exception when executing <code>adapter.Fill(ds)</code></p>
  
  <pre><code>System.OverflowException
  Arithmetic operation resulted in an overflow.
  </code></pre>
  
  <p>I have no clue because the same code and sql query works on my old machine. Any suggestions will be appreciated.</p>
  
  <p>StackTrace</p>
  
  <pre><code> at System.Data.Odbc.OdbcDataReader.GetSqlType(Int32 i)
   at System.Data.Odbc.OdbcDataReader.GetFieldType(Int32 i)
   at System.Data.ProviderBase.SchemaMapping.SetupSchemaWithoutKeyInfo(MissingMappingAction mappingAction, MissingSchemaAction schemaAction, Boolean gettingData, DataColumn parentChapterColumn, Object chapterValue)
   at System.Data.ProviderBase.SchemaMapping..ctor(DataAdapter adapter, DataSet dataset, DataTable datatable, DataReaderContainer dataReader, Boolean keyInfo, SchemaType schemaType, String sourceTableName, Boolean gettingData, DataColumn parentChapterColumn, Object parentChapterValue)
   at System.Data.Common.DataAdapter.FillMappingInternal(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 schemaCount, DataColumn parentChapterColumn, Object parentChapterValue)
   at System.Data.Common.DataAdapter.FillMapping(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 schemaCount, DataColumn parentChapterColumn, Object parentChapterValue)
   at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
   at System.Data.Common.DataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
  </code></pre>