0

I am trying to view/open a document but I am getting this error. Please help.

This is my code:


    byte[] fileText = (byte[])dataTable.Rows[0]["fileContent"];  //Error occurs here

   
Unknown
  • 145
  • 2
  • 11
  • Depending on your specific scenario, you may want to make sure the database does have the data (making the database column NOT NULL) – Cleptus Apr 23 '21 at 07:36
  • [DataRow.IsNull](https://learn.microsoft.com/en-us/dotnet/api/system.data.datarow.isnull?view=net-5.0) – Steve Apr 23 '21 at 07:38
  • @Cleptus ''if(dataTable.Rows[0] != DBNull.Value)'' this returns an error opeartor cannot be applied – Unknown Apr 23 '21 at 07:39

0 Answers0