Importing Ole Objects into a table from a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to import pictures into a database table in an automated way.
Looking to point to one folder and import all the files in that folder.
Either *.bmp or *.jpg will be the file format.
 
Hi,
you should NOT actually embed these pictures in the db. It will cause
massive bloat and you will run out of space in no time. You should store the
path to the files in a text field instead and use it at runtime to display
the image on a form or report.
HTH
Good luck
 
Thanks, but I have to embed the file, not a big deal for size, most of our
data is in multiple databases due to size. Thanks though.
 
I don't think you understand!
Access cannot handle images well at all. The new version (access 12) is
supposedly able to handle image storage better, but for now you will have
astronomical increases in db size if you embed images. Let me show you a
little example to demonstrate this better:

jpeg photo 2240 x 1680, high compression - file size = 183 KB (0.18 MB)
Size of Database + 1 Image:
OLE Embedded 33,572 KB (32.79 MB) 18222 % overhead
OLE Linked 22,392 KB (21.87 MB) 12100 % overhead
Raw Binary 300 KB (0.29 MB) 3 % overhead

This is just with ONE image and a fairly small one. Image doing this with
many and larger files. You will run out of the 2gb limit very fast and your
performance will suffer as well.
HTH
Good luck
 
Actually we manually import the pictures at this point with no problems. In
fact using bitmap only, much larger to start with, we import up to several
hundread pictures with no issue. Again I am no concerned with size, just
automating the process. Thanks again.
 
The code in our batch-load sample should help you with this. The sample is based around our own image
control, but most of the code should port directly to other approaches.

http://www.ammara.com/support/samples/showsam8431.html

As mentioned by others, there are several serious problems with OLE Embedding, including the huge storage
overhead, configuration, compatibility etc. Access is actually quite capable of storing images without
the overhead (or the other problems), either using a ready made solution like our own or code-based solutions
such as Larry Linsons', so if you are having to work with multiple databases due to this it is probably
quite unnecessary (unless you have already filled 50 or more mdb's).
 
I get the "can't find server" message.

bob said:
The code in our batch-load sample should help you with this. The sample is based around our own image
control, but most of the code should port directly to other approaches.

http://www.ammara.com/support/samples/showsam8431.html

As mentioned by others, there are several serious problems with OLE Embedding, including the huge storage
overhead, configuration, compatibility etc. Access is actually quite capable of storing images without
the overhead (or the other problems), either using a ready made solution like our own or code-based solutions
such as Larry Linsons', so if you are having to work with multiple databases due to this it is probably
quite unnecessary (unless you have already filled 50 or more mdb's).

--
_______________________________________________________
http://www.ammara.com/
Image Handling Components, Samples, Solutions and Info
DBPix 2.0: Add pictures to Access, Easily & Efficiently
 
freakazeud said:
Hi,
you should NOT actually embed these pictures in the db. It will cause
massive bloat and you will run out of space in no time. You should store the
path to the files in a text field instead and use it at runtime to display
the image on a form or report.
HTH
Good luck
--


Hello
I have a similar problem.
need to add a large amount of BMP images in a database of posters as LINKED
files, they
are small previews of the original prints.

I created a filed in a table with an OLE object data type. Then I fill this
field by a form adding linked pictures to the database.

Each record of the table has also another field called "ID" wich is a number
(01, 02, 03...).
The name of the pictures that I am inserting are exactly as that ID number
(01.bmp, 02.bmp, 03.bmp...).

I would like to find a way to quiclky add this pictures. It takes too much
time to place them one by one, since they are more than 2,000.

Is there a way to design an automate placement?

I placed 20 pics, right now, and I noticed the file's size is not
increasing. I suppose because the images are linked. I need images, because
the selection of the record of the database is possible only looking at the
images.

I placed a post here:

http://www.microsoft.com/office/com...08c4-492f-9738-016194771931&lang=en&cr=US&p=1

I hope you can help, I just started using access, and I am still learning.

Many thanks.
MArcello
 
freakazeud said:
Hi,
you should NOT actually embed these pictures in the db. It will cause
massive bloat and you will run out of space in no time. You should store the
path to the files in a text field instead and use it at runtime to display
the image on a form or report.
HTH
Good luck
--


Hello
I have a similar problem.
need to add a large amount of BMP images in a database of posters as LINKED
files, they
are small previews of the original prints.

I created a filed in a table with an OLE object data type. Then I fill this
field by a form adding linked pictures to the database.

Each record of the table has also another field called "ID" wich is a number
(01, 02, 03...).
The name of the pictures that I am inserting are exactly as that ID number
(01.bmp, 02.bmp, 03.bmp...).

I would like to find a way to quiclky add this pictures. It takes too much
time to place them one by one, since they are more than 2,000.

Is there a way to design an automate placement?

I placed 20 pics, right now, and I noticed the file's size is not
increasing. I suppose because the images are linked. I need images, because
the selection of the record of the database is possible only looking at the
images.

I placed a post here:

http://www.microsoft.com/office/com...08c4-492f-9738-016194771931&lang=en&cr=US&p=1

I hope you can help, I just started using access, and I am still learning.

Many thanks.
MArcello
 
Back
Top