Store picture from vb to access field

5 pts.
Tags:
Visual Basic
Hi, can somebody please guide me on how to link/save a picture in VB to store in an OLE field in access database?? Please let me know. In desperate need. Thanks in advance Princess8

Answer Wiki

Thanks. We'll let you know when a new response is added.

I don’t know if this will help, but I’d just make sure the picture is in a persistent location url/path whatever and store that url/path in the db. Or is the VB pgm creating the picture? Still, then it could be saved to the filesystem and referenced in db.

Discuss This Question: 7  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • PRINCESS8
    That would work for the forms but for reporting purpose i would require to store the pic so the the report could pick the picture directly. Awaiting desperate help. Thanks in advance. princess8
    5 pointsBadges:
    report
  • Timallard
    Storing it as a BLOB is typical (binary)... the reason most people don't do this is that it inflates the database size a lot.
    0 pointsBadges:
    report
  • CSharpLover
    If you need to display the images in the report, and if it is a web-based report, you can very well make use of IFRAME and provide its SRC attribute, the image path that you have stored in OLEDB field. The reason why I am suggesting this option is, because if an option of stored images on predifined location and storing the path in DB is available, it will be overhead to store full image.
    0 pointsBadges:
    report
  • Mejohnson
    What I have done is created a text field in a table. Store the location of the picture (c:picturespicture1.jpg) for each record. Create the report but you must have at least one grouping. I stick everything in the grouping. Insert a picture object. It can be any picture; doesn't matter. Then on the OnFormat event of the grouping type me.image.picture (name of image object) = me.txtpicture (textfield) format_count = 1 This takes a very very very long time and if you have lots of pictures, records, etc. even longer. Be patient.
    0 pointsBadges:
    report
  • Tmalik
    I am not sure exactly about access but I know for sure that sql server uses image type field to save pictures and oracle use BLOB datatype to save images. You usually save things like Jpegs and Gifs into a database like access, sql or oracle save pictures in binary. There are a lot of material available over the web for this. Just type in saving binary data to database in VB. You will get a lot of hits in google or yahoo. good luck. Malik
    0 pointsBadges:
    report
  • Manu1076
    u can store ur images/files in access database using BLOB datatype, but this would inflate the database size. so its always preferred to store the path/url of the image/file into the database.
    0 pointsBadges:
    report
  • Mikessoftware
    You will be much better off in the long run if you save the picture to a file and store the path to the file in Access.
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following