473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 4529
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,834 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

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

Similar topics

2
by: Paul Reddin | last post by:
Hi, (V8.1 Fp2) Our application uses JDBC batch to execute mutiple insert statements and we saw a strange thing this morning. There were 4 SQL Insert statements in the batch, and we know the...
6
by: Patrick | last post by:
How do you insert a jpg picture from file on to an area of a dialog box I can do this using picturebox to insert a jpg picture onto a form, but the picturebox control is not available for a...
1
by: matthias | last post by:
I have to execute fairly large batch files (200-300MB) with several million INSERT commands. When I do that from pgsql using the \i switch, I get the echo INSERT 0 1 for every single insert...
7
by: mark.a.lemoine | last post by:
Our application currently interfaces to SQL Server and Oracle, we're implementing it into DB2 currently and I have a question to ask. First a little background - We're interfacing into DB2 v8 on...
12
by: tojigneshshah | last post by:
Hi, I have a situation where i have multiple batch and the each batch are sequence numbers. For each batch, the number should start with 1. For example: Col.no1 Col.no2 ------ ...
4
by: NASAdude | last post by:
I'm working on distributing a database using VS Tools for Office, and am having trouble with linked images on forms/reports. The image objects have a default path\file set on the .Picture property,...
1
by: Parasyke | last post by:
Thanks for any help.. I currently have a database with about 100 products with picture links in an external folder. I have a form from which I can successfully display a product, its...
1
by: ahujasatna | last post by:
Hi all!! i am working on C#, ASP.Net with Sql server2000 and i am facing a problem, my Question is: "How to insert and retrieve images to/from Sqlserver2000 Database" I created a table...
3
by: JFKJr | last post by:
Hello everyone, I am trying to insert a picture in an excel spreadsheet cell using Access VBA. The following excel VBA code is working perfectly fine and I am able to insert picture in "A1" cell....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.