Nel

Nel

  • NA
  • 716
  • 1.1m

When casting from a number, the value must be a number less than infinity

Aug 8 2011 8:54 AM
When running the code below I got error when casting from a number, the value must be a number less than infinity:
 using (SqlDataReader reader = command.ExecuteReader(CommandBehavior.SingleRow))
  {
  
  if (reader.Read())
  { 
  dokument = new Dokument(reader.GetInt32(0),
  reader.GetDateTime(1),
  reader.GetString(2),
  reader.GetString(3),
  reader.GetDecimal(4),
  reader.GetString(5)[0],
  reader.GetDecimal(6),
  reader.GetDecimal(7),
  reader.GetInt32(8),
  reader.GetString(9),
  reader.GetString(10));
  }
  }
Can anybody help me please where I go wrong?
Thanks

Answers (30)