Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 168
  • Last Modified:

How to VB<->picture<->Access?

what should i do if i want stores pictures like jpg or bmp in Access?

after, how do retrieve that pic with VB????
imgCook.Picture = LoadPicture(rs("imgPicture")) 'rs is a recordset
0
mkyong
Asked:
mkyong
  • 3
  • 2
1 Solution
 
hj2k3Commented:
it might be easier to store the images externally, and just have a string field in the database that contains the path to the file. not sure how to do it otherwise.

hope this helps
0
 
mkyongAuthor Commented:
yup, working images externally is easier, i done already, use the hyperlink.

i saw some Access databse use the OLE object to insert the picture, but dun know how to link with vb.

So, is that not possible stores picture in Access?  
0
 
hj2k3Commented:
in theory you could use OLE, but that could pose problems because the OLE object is created depending on which application happens to be associated with opening picture formats, which may differ from machine to machine. i would not recommend this. i agree, just use hyperlink or string, both will work equally well from VB
0
 
mkyongAuthor Commented:
Thanks hj2k3
0
 
hj2k3Commented:
no problem :-)
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now