Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 1st, 2007, 04:48 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: abu dbabi, , United Arab Emirates.
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default Photo in Access table

I have to develop project information db in access.
table is following

project
--------------------------
project_id text pk
project _name text
photo_before
photo_after

I want to store the photo information before the start of project
and after completion the project.
which data type will use ?
phot_before and photo_after OLE_OBJECT datatype will use ?

How can store the photo/image file name and folder path in the table ?
access form can create for photo data entry ?

Please help
Mateen



Reply With Quote
  #2 (permalink)  
Old November 1st, 2007, 07:55 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

The issue is, do you want to store the image IN Access, or just a link to the image.

If you want the photo in Access, then use the OLE DB data type, and when you add the control to a form, there will be options to import an image (right click on the control.) This will very quickly result in a very large database, and you will need to split it (front end, back end for data, back end for before photos, back end for after photos, etc).

You can also store the path to image files, which takes up much less space, although everyone who accesses the database will need to be mapped to the network storage location with the same drive letter, etc. This would be the case with a split database as above.

I did a search at Microsoft.com for this and came up with:

Use VBA code to display images
If you need to work with a large number of image files and you want to display a different image with each database record, using some VBA programming can save you time and storage space. You store your images on your hard drive or network, store the paths and file names of your images in a text field in your database, and then use VBA code to read the path information and set the Picture property of the Access image control.

Keep in mind that this process links to your image files — it does not bind them. Also, if you move your database, you also need to move your images. To see an example of this technique, start the Northwind Traders sample database and open the Employees form in Design view.

Open the table to which you want to add the field in Design view .
In the first blank row of the design tool, under Field Name, enter Image.
Click the next field (the field in the Data Type column), and select Text from the list.
Save the table.
Follow the instructions in this Microsoft Knowledge Base article:
How to display images from a folder in a form, a report, or a data access page


Caution Your database users can view the paths to your image files. Unless you trust all possible users, remove any personal information, such as your name or the name of your computer, from the file paths. Also keep in mind that you can use relative paths to refer to pictures.

For example, if you place your database on a network, such as \\ServerName\ShareName\, and store your images in a folder on that share, such as \\ServerName\ShareName\Pictures, you don't have to specify the entire path.

So, instead of using \\ServerName\ShareName\Pictures\Picture.gif, you can use only the portion of the path that is different, relative to the location of the current Access file, like this: Pictures\Picture.gif.

From: http://office.microsoft.com/en-us/ac...802251033.aspx

Did that help?


mmcdonal

Look it up at: http://wrox.books24x7.com
Reply With Quote
  #3 (permalink)  
Old November 2nd, 2007, 08:48 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: abu dbabi, , United Arab Emirates.
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks you very much.
I realy appreciate your details response.

regards
Mateen


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error posting photo to photo album abel714 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 10 February 5th, 2007 03:07 AM
Photo software malambing57 ASP.NET 1.0 and 1.1 Professional 1 January 9th, 2007 11:50 AM
Wrox Photo Album Help rsearing BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 6 September 27th, 2006 02:30 PM
Display 'no photo' in a JSP when photo is not pres Inderjeet Pro JSP 0 April 21st, 2006 05:35 AM
fading from photo to photo in flash elladi Flash (all versions) 1 November 28th, 2004 11:21 PM



All times are GMT -4. The time now is 12:00 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.