0
Dim ioStream As New MemoryStream(byteArray.Length)

If byteArray.Length = 78 Then
    ioStream.Write(byteArray, 78, byteArray.Length - 78)
Else
    ioStream.Write(byteArray, 0, byteArray.Length - 0)
End If

I want to create the condition to check (String.Length) for image from Northwind and image from My Files. but I didn't know how to create that. I have to try like above code but it didn't work.

Han
  • 3,052
  • 2
  • 22
  • 31
  • To check the size in the database: [Size of VARBINARY field in SQL Server 2005](http://stackoverflow.com/questions/507785/size-of-varbinary-field-in-sql-server-2005). To get the size of a file: [FileInfo.Length](https://msdn.microsoft.com/en-us/library/system.io.fileinfo.length(v=vs.110).aspx). – Andrew Morton Jan 15 '17 at 17:56
  • Thank you so much, great information.. @AndrewMorton – M. Putra Nur Rahman Jan 15 '17 at 23:21

0 Answers0