Results 1 to 3 of 3

Thread: OLE Object

  1. #1
    Join Date
    Feb 2004

    Exclamation Unanswered: OLE Object

    I have a field in one of my database tables in which I want to store images in.I have tried saving .gif, .bmp, Word pictures and many more.The database is connected to a visual basic application to display the data but I cannot work out how to display the field with the OLE Objects - have tried using Image box, Picture box, label etc. and setting the datasource and datafield properties but none display the images - the error I get says "unable to bind to datafield "
    would be so grateful if anyone could help!!!

  2. #2
    Join Date
    Jan 2004

    Re: OLE Object

    Instead of saving the image in your database try saving only the path of the image in your database. This reduces the size of your database and is a lot easier to set the image or picturebox property with just the path.
    In abundance of water only the fool is thirsty. Bob Marley.

  3. #3
    Join Date
    Nov 2003
    Do as rami.haddad suggests then read the field into the PictureBox. You can place the bound TextBox onto your form as hidden if you like then load the picture when the record becomes current.

    In VB:

    Me.myPictureBoxName.Picture = LoadPicture(Me.myHidPicPathTextBox)

    or directly:

    Me.myPictureBoxName.Picture = LoadPicture("PathToMyPicture")

    Hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts