Image Retrieve From Sql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mafaisal
    New Member
    • Sep 2007
    • 142

    Image Retrieve From Sql

    Hello Experts

    I am Using vb.net2005 And sql2005

    See The Attachment

    This is Error When i retrieve image from Db
    I store Picture as datatype image

    Please See The Attachment

    Faisal
    Attached Files
    Last edited by mafaisal; Mar 1 '08, 05:29 PM. Reason: For Attaching Errors
  • FredSovenix
    New Member
    • Mar 2008
    • 10

    #2
    For me, the ArgumentExcepti on gets raised most often when the binary image data loaded from the database is corrupt and does not represent an image that can be properly interpreted. For example, we had code that would copy the image data to a byte array before writing that byte array to the database, except when performing the copy it would use UBound(m_SrcByt es) instead of UBound(m_SrcByt es) + 1 as the number of bytes to copy into the array, effectively lopping off the last byte of the image and thereby corrupting it.

    Can you verify that the image data itself is intact and correct by exporting it elsewhere and perhaps saving it to a file and trying to display the image through Windows Explorer?

    Comment

    Working...