How can import in a table images massively?

  • Thread starter Thread starter giannis
  • Start date Start date
G

giannis

I want make a table with 500 images.
How can import these pictures in the table
not one by one but all together?
Is there a way write a code in VB for this
purpose ?

The pictures importing as Ole Objects ?
Saved as .jpg or as .bmp ?
 
You may want to just creat a HyperLink field and point to
the Pictures. This would greatly reduce the size of your
database. I would also convert any .bmp files to .jpg.
 
Hi Giannis,

It is not necessary to cross-post to so many newsgroups.

Usually, the best way to handle images with Access is to leave them in
their original files (jpg, bmp or another format) and simply to store
the names and locations of these files in your table. Storing the images
themselves in an OLE field causes the size of the mdb file to "bloat"
beyond reason.

Arvin Meyer's PictureMgr sample database at
http://www.datastrat.com/DataStrat2.html demonstrates techniques for
managing images as external files.

You can create a textfile containing a list of your image files that can
be imported into an Access table:

1) Open a command prompt (DOS prompt)

2) Using the CD command, navigate to the folder containing the images,
or the folder containing subfolders that contain the images

3) Create the textfile with a command like this:
DIR /B *.jpg > "C:\folder\List of JPG.txt"
If the image files are also in subfolders, use the /S switch also:
DIR /B /S *.jpg > "C:\folder\List of JPG.txt"



I want make a table with 500 images.
How can import these pictures in the table
not one by one but all together?
Is there a way write a code in VB for this
purpose ?

The pictures importing as Ole Objects ?
Saved as .jpg or as .bmp ?

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
With the dir /b *.jpg the .txt contains only the names of
pictures and not all the path (c:\folder\1.jpg)
I know this technique but i want learn how import
many pictures in a database (no one by one)

John Nurick said:
Hi Giannis,

It is not necessary to cross-post to so many newsgroups.

Usually, the best way to handle images with Access is to leave them in
their original files (jpg, bmp or another format) and simply to store
the names and locations of these files in your table. Storing the images
themselves in an OLE field causes the size of the mdb file to "bloat"
beyond reason.

Arvin Meyer's PictureMgr sample database at
http://www.datastrat.com/DataStrat2.html demonstrates techniques for
managing images as external files.

You can create a textfile containing a list of your image files that can
be imported into an Access table:

1) Open a command prompt (DOS prompt)

2) Using the CD command, navigate to the folder containing the images,
or the folder containing subfolders that contain the images

3) Create the textfile with a command like this:
DIR /B *.jpg > "C:\folder\List of JPG.txt"
If the image files are also in subfolders, use the /S switch also:
DIR /B /S *.jpg > "C:\folder\List of JPG.txt"



I want make a table with 500 images.
How can import these pictures in the table
not one by one but all together?
Is there a way write a code in VB for this
purpose ?

The pictures importing as Ole Objects ?
Saved as .jpg or as .bmp ?

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
Follow-ups set to microsoft.public.access and .access.externaldata only.

If you want the full path, either use the /S switch in the DIR /B
command, or store the path in a separate field and concatenate path and
filename when needed. The latter is often better because it makes it
easier to revise your folder structure if that's ever necessary.

As I said before, it's usually not a good idea to attempt to store large
numbers of images in OLE fields in an Access database (for the reasons
given at http://support.microsoft.com?id=123151).

If you insist on doing it, be prepared for a very large mdb file indeed
and follow the instructions at
http://support.microsoft.com/?id=198466 (Access 2000)
http://support.microsoft.com/?id=158941 (Access 97)



With the dir /b *.jpg the .txt contains only the names of
pictures and not all the path (c:\folder\1.jpg)
I know this technique but i want learn how import
many pictures in a database (no one by one)

John Nurick said:
Hi Giannis,

It is not necessary to cross-post to so many newsgroups.

Usually, the best way to handle images with Access is to leave them in
their original files (jpg, bmp or another format) and simply to store
the names and locations of these files in your table. Storing the images
themselves in an OLE field causes the size of the mdb file to "bloat"
beyond reason.

Arvin Meyer's PictureMgr sample database at
http://www.datastrat.com/DataStrat2.html demonstrates techniques for
managing images as external files.

You can create a textfile containing a list of your image files that can
be imported into an Access table:

1) Open a command prompt (DOS prompt)

2) Using the CD command, navigate to the folder containing the images,
or the folder containing subfolders that contain the images

3) Create the textfile with a command like this:
DIR /B *.jpg > "C:\folder\List of JPG.txt"
If the image files are also in subfolders, use the /S switch also:
DIR /B /S *.jpg > "C:\folder\List of JPG.txt"



I want make a table with 500 images.
How can import these pictures in the table
not one by one but all together?
Is there a way write a code in VB for this
purpose ?

The pictures importing as Ole Objects ?
Saved as .jpg or as .bmp ?

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
Thank you !!!

John Nurick said:
Follow-ups set to microsoft.public.access and .access.externaldata only.

If you want the full path, either use the /S switch in the DIR /B
command, or store the path in a separate field and concatenate path and
filename when needed. The latter is often better because it makes it
easier to revise your folder structure if that's ever necessary.

As I said before, it's usually not a good idea to attempt to store large
numbers of images in OLE fields in an Access database (for the reasons
given at http://support.microsoft.com?id=123151).

If you insist on doing it, be prepared for a very large mdb file indeed
and follow the instructions at
http://support.microsoft.com/?id=198466 (Access 2000)
http://support.microsoft.com/?id=158941 (Access 97)



With the dir /b *.jpg the .txt contains only the names of
pictures and not all the path (c:\folder\1.jpg)
I know this technique but i want learn how import
many pictures in a database (no one by one)

John Nurick said:
Hi Giannis,

It is not necessary to cross-post to so many newsgroups.

Usually, the best way to handle images with Access is to leave them in
their original files (jpg, bmp or another format) and simply to store
the names and locations of these files in your table. Storing the images
themselves in an OLE field causes the size of the mdb file to "bloat"
beyond reason.

Arvin Meyer's PictureMgr sample database at
http://www.datastrat.com/DataStrat2.html demonstrates techniques for
managing images as external files.

You can create a textfile containing a list of your image files that can
be imported into an Access table:

1) Open a command prompt (DOS prompt)

2) Using the CD command, navigate to the folder containing the images,
or the folder containing subfolders that contain the images

3) Create the textfile with a command like this:
DIR /B *.jpg > "C:\folder\List of JPG.txt"
If the image files are also in subfolders, use the /S switch also:
DIR /B /S *.jpg > "C:\folder\List of JPG.txt"




I want make a table with 500 images.
How can import these pictures in the table
not one by one but all together?
Is there a way write a code in VB for this
purpose ?

The pictures importing as Ole Objects ?
Saved as .jpg or as .bmp ?


John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
Back
Top