Home
dbPix
Download
Order
Testimonials
Support
Tutorials
Samples
KnowledgeBase
Links
Revision History
Documentation
Search
Contact
Site Map

Graph: dbPix image storage vs OLE Embedding and Linking in Microsoft Access


Using DBPix with recordset data (unbound)

    
DBPix Image Control 
Free Evaluation
Fully functional


Download Now

For Windows XP through 10 & all Windows Server versions.

Buy Now!

dbPix Resources

Samples
Support
About dbPix


You can treat the control's image property as you would any other, asigning it to recordset fields or variables etc.

The following code saves the new image into a recordset field after the user clicked a "Load" button to select an image from the file system.

Private Sub BtnLoad_Click()
    If DBPixCtl.ImageLoad Then
        rs("Image") = DBPixCtl.Image
    End If
End Sub


You could use similar code to handle loading an image from a camera, scanner or the clipboard. Just replace the ImageLoad call with the relevant method.
If you're storing images for a web application you may also wish to store the image dimensions here. The web samples and articles cover this in more detail.

When the recordset data has changed you need to update the image in the control.
This is as easy as:

 DBPixCtl.Image = rs("Image")


At this point you could also update any controls that display information about the image by refering to DBPix's image information properties.