Storing and Displaying images thorugh VB using MS-Access database

Discussion in 'Visual Basic ( VB )' started by Zephyr, May 31, 2008.

  1. Zephyr

    Zephyr New Member

    Joined:
    May 31, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    I have given a Ms-Access database in which an OLE object field named "Picture" is present. In this field already pictures are stored as a link. No path and file name has been stored in the database. Now i have a task to display those already saved pictures on a form and then save those pictures again in a ms-access database in a binary format.
    I don't have any idea that how i will display the pictures from database to a form as there is not path and filename stored in database. Kindly help me in this regard. The code is to be written using Visual Basic 6.0
     
  2. future_boy

    future_boy New Member

    Joined:
    May 27, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Sorry Dear, no Idea!

    I think Shabbir can help u in this.

    Unless here he won't say "it shouldn't be in ths forum"
     
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,346
    Likes Received:
    382
    Trophy Points:
    83
    Take the binary data and store the file into a temp location and then display using picturebox and then when done delete the temp image file.
     
  4. Zephyr

    Zephyr New Member

    Joined:
    May 31, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    There is no binary data available. I have given a d atabase in which already pictures are stored as link. No path and filename has been stored in the database. I have to view those pictures on a form. But i have no idea how i will show those pictures on a form as there is no file name and path stored in the database
     
  5. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,346
    Likes Received:
    382
    Trophy Points:
    83
    What do you mean by links?
     
  6. Zephyr

    Zephyr New Member

    Joined:
    May 31, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    There is an option in ms-access database which allowes to store pictures as a link in OLE btype field. In a table a picture can be stored in a photo link. This option is present in Insert menu---> object. Window appears which contains two options. 1- Create New 2- Create From File. When Create from File option is checked the link option appears. This link option saves picture as a link object. The database which is given to me contains pictures as a link object and there is no field for path and filename of a picture.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice