469,907 Members | 2,184 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,907 developers. It's quick & easy.

Batch insert picture objects?

Hi

I am a technology teacher/support person at an elementary school. I have created a database in which I need to insert a picture for each of our 650+ students. I have a table of student information with the student id as the primary key. Another table is the student photos table that has the student id and the imagename.bmp of the photo of that student and a OLE Object field for the picture image. All of the actual picture files are .bmp files saved in the same folder as the database. I have been manually inserting pictures using these steps:
In the Student Photo Files Table in the Picture field right click> Insert Object
Create New > Bitmap Image > OK
Image > Attributes 96 Width 134 Height (that is the size of the picture files)
Edit > Paste From > then I locate the picture

Is there a script that would do this? Is there another way to easily insert pictures into a database?

Thank you so much for any advice. Of course my principal wants this database done in the next couple days. :)

Amy
May 29 '07 #1
3 4040
nico5038
3,080 Expert 2GB
Hi Amy,

Storing images this way in a database can cause bloat (When you have Access 2000 it's advised to make sure to have the Service Packs installed to prevent this:
SR1a/2:
http://support.microsoft.com/default...;en-us;Q276367
SR3:
http://support.microsoft.com/default...;EN-US;326585)

One option is to record just the location and name of the file and make it visible by dynamically setting the properties for an unbound inage control on the form.
When you want to store the images in the database another way is to use so-called BLOB's. This will save space and there are some sample databases for at: http://www26.brinkster.com/alzowze/home.asp and http://www.jamiessoftware.tk/article...ingimages.html

With automating the OLE-objects I've had some bad experiences, thus I would advise to first check the two above proposals.

Nic;o)
Jun 2 '07 #2
ADezii
8,800 Expert 8TB
Hi

I am a technology teacher/support person at an elementary school. I have created a database in which I need to insert a picture for each of our 650+ students. I have a table of student information with the student id as the primary key. Another table is the student photos table that has the student id and the imagename.bmp of the photo of that student and a OLE Object field for the picture image. All of the actual picture files are .bmp files saved in the same folder as the database. I have been manually inserting pictures using these steps:
In the Student Photo Files Table in the Picture field right click> Insert Object
Create New > Bitmap Image > OK
Image > Attributes 96 Width 134 Height (that is the size of the picture files)
Edit > Paste From > then I locate the picture

Is there a script that would do this? Is there another way to easily insert pictures into a database?

Thank you so much for any advice. Of course my principal wants this database done in the next couple days. :)

Amy
We can do this:
  1. For any given Record, clicking this Command Button will open a File Dialog Box where you can Browse for your Photo File to Insert.
  2. Once you select a File, it will automatically be inserted into the OLE Bouond Control.
  3. Before I write the code, I want to make sure that this is exactly what you want.
  4. I know there is pre-existing code that accomplishes just this. In the meantime, I'll see if I can find it.
Jun 2 '07 #3
We can do this:
  1. For any given Record, clicking this Command Button will open a File Dialog Box where you can Browse for your Photo File to Insert.
  2. Once you select a File, it will automatically be inserted into the OLE Bouond Control.
  3. Before I write the code, I want to make sure that this is exactly what you want.
  4. I know there is pre-existing code that accomplishes just this. In the meantime, I'll see if I can find it.
Hi...was wondering if you were able to locate this script? Thanks so much!

Amy
Jun 7 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Paul Reddin | last post: by
6 posts views Thread by Patrick | last post: by
7 posts views Thread by mark.a.lemoine | last post: by
12 posts views Thread by tojigneshshah | last post: by
1 post views Thread by Parasyke | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.