0

Hi
I have an image converted to binay and saved in SQL database.
Below is my line of code where application is throwing above exception that im using for showing image

Dim mem As New IO.MemoryStream(CType(io.File.ReadAllBytes(imgfilepath), Byte()))

Does anybody knows how can i fix this?
Thanks and regards,
f

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by fawadkhalil
0

Hi

You can compare the Path Stored in DB with physical path of the file along with their file extension eg .bmp/.jpeg etc...

0

If the variable 'imgfilepath' has a invalid path or file name, it will throw
System.IO.DirectoryNotFoundException with error message 'Could not find a part of the path .......'.

Otherwise post the complete exception message. It will help to identity the exact issue.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.