|
-
October 20th, 1998, 03:23 PM
#1
Storing .jpg in Access
When .jpg is stored in an access database it is first rendered (turned into a .bmp/dib) and this rendering is stored with it - removing any storage advantage gained from converting the picture to .jpg - an important consideration given access's limit of 1Gb per mdb.
To overcome this, I renamed my .jpg files to .jpx files before inserting to the ole field. OK so far. Now I use a vb program to retrieve the records, data control and ole container. The image appears as an Icon in the ole container. Right clicking gives me the option to 'Edit Package'. I thus use the Object Packager to save my retrieved .jpx file to a file "picfile.jpg". I have an image control image1 on the form into which I load the picture with the following code behind the command button "image1.picture = LoadPicture("c:\abc\picfile.jpg")
I have achieved what I want ie Store a photograph in Access in .jpg format without the storage overhead of also storing the rendered image and be able to retrieve that photo and display it. (I do not want to store the .jpg in a directory and a referencein the db)
What I really want is to do all this in code - any ideas?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|