vb.net: Could not find a part of the path

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Dec 2008
Posts: 42
Reputation: fawadkhalil is an unknown quantity at this point 
Solved Threads: 0
fawadkhalil fawadkhalil is offline Offline
Light Poster

vb.net: Could not find a part of the path

 
0
  #1
Oct 12th, 2009
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

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

Does anybody knows how can i fix this?
Thanks and regards,
f
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 66
Reputation: reach_yousuf is an unknown quantity at this point 
Solved Threads: 12
reach_yousuf reach_yousuf is offline Offline
Junior Poster in Training
 
0
  #2
Oct 12th, 2009
Hi

You can compare the Path Stored in DB with physical path of the file along with their file extension eg .bmp/.jpeg etc...
Yousuf
Software Developer
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 432
Reputation: Ramesh S will become famous soon enough Ramesh S will become famous soon enough 
Solved Threads: 82
Ramesh S Ramesh S is offline Offline
Posting Pro in Training
 
0
  #3
Oct 12th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 42
Reputation: fawadkhalil is an unknown quantity at this point 
Solved Threads: 0
fawadkhalil fawadkhalil is offline Offline
Light Poster
 
0
  #4
Oct 12th, 2009
Actually filename was incorrect .
Thanks Ramesh for pointing out.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC