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 
DBPix Developers Kit
Download V2.0
For Windows XP, 2000,
NT, ME, 98 & 95


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.