By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,421 Members | 1,233 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,421 IT Pros & Developers. It's quick & easy.

Batch insert picture objects?

P: 2
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
Share this Question
Share on Google+
3 Replies

nico5038
Expert 2.5K+
P: 3,072
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
Expert 5K+
P: 8,750
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

P: 2
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.