Solved

insert image to access db

Posted on 2011-03-14
21
411 Views
Last Modified: 2012-05-11
Would you please help me.  I scanned image which I need to insert into database.  Problem is that I usually drag and drop it to the form.  All the time it was working.  Now image being inserted as package.  I can activate package.  My point is that image have to be added to the table as image itself not the package
0
Comment
Question by:maximyshka
  • 7
  • 6
  • 4
  • +2
21 Comments
 
LVL 84
ID: 35136620
I'm nor sure what a "package" might be, but are you actually saving the image files in the database? Note that is a bad idea, especially in older versions of Access. It causes significant bloat and corruption, and will eventually lead to data loss.

If you are storing them internally, I assume you're doing so in an OLE column. To move data into an OLE column, you use the AppendChunk method:

http://msdn.microsoft.com/en-us/library/ms678200(v=vs.85).aspx

However, as stated above, you would be far better off simply storing a link to the location of your scanned file.

0
 

Author Comment

by:maximyshka
ID: 35136696
That code is not needed.  I have one small image.  Question: how can I get rid of package.  Yes, image was added to OLE column.  
0
 
LVL 84
ID: 35136721
Again: I'm not sure what a "package" might be. What is a "package"?
0
 

Author Comment

by:maximyshka
ID: 35136841
That is the main issue.  It is not programmiing question it is question of adding images to the form.  Image was scanned, resized using microsoft picture editor, saved as jpg or bmp.  When I tried to drag and drop to the form source table show that package added instead of actual image.

0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 100 total points
ID: 35139138
I had this issue once, ...IIRC, it had to do with the file associations.
Many graphic programs will "Hijack" the associations. (whether you know/like it or not) without asking or alerting you...

My experience with this is that this functionality (OLE/ drag and drop) really wants to work with the Office/Windows defaults.

I remember jerking around with associations, rebooting, reinstalling office, ...etc, ...until it worked.
(Sorry, not much of a "technical" explanation)

In the big scheme of things, this is the reason why (unless there is a specific reason) I almost never store anything in a db that I can link to.

JeffCoachman

0
 
LVL 75
ID: 35139782
I've seen the Package thing before and it's very annoying ... not sure what causes that.  

You might want to consider this or at least be aware of if you are dealing with images in an Access database ... and I can totally vouch for this program.  
http://www.ammara.com   >>> DBPix ...

It does *all* the work for you. Examples show how to add a simple 'control' panel to Load, Save, Zoom In/Out, Size To Fit and much more.  AND ... virtually eliminates BLOAT associated with storing images in an Access MDB. I have 3 clients who sell commercial run-time products that use DBPix.

Note. I have no connection with DBPix ... except I have used it many times ...

mx
0
 

Author Comment

by:maximyshka
ID: 35140323
Thanks MX.  Unforturnatelly, I can't use 3rd parties programs.  Would you please is there technique, where I can quickly remove image from the package and put it to report so I don't need to spend lots of time to do that.  Your answer will be very appreciated.

I feel it might causing this Microsoft Office Picture Manager (2007).  Sometimes, new programs are worse than old programs.  However, this program has editing tools...
0
 
LVL 75
ID: 35140365
I really don't know what the answer is, sorry ...

mx
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35140592
<is there technique, where I can quickly remove image from the package and put it to report>

Please clarify in detail exactly what you mean by this....
0
 

Author Comment

by:maximyshka
ID: 35140899
Question was: how can I remove image from the package and insert it to the report
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35141063
Try this:
http://www.lebans.com/oletodisk.htm


Other than that, you may have to see if you can somehow "Restore" your system to the previous state where this was all working.
0
 

Author Comment

by:maximyshka
ID: 35153131
other ideas without 3rd parties programs.  Is this Access 2000 Issue or Windows Issue?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35154205
Bothy...
 ...in my experience it is mostly effected by "Widows" file associations affecting "Office" functionality
0
 
LVL 23

Expert Comment

by:OP_Zaharin
ID: 35154223
are you saving JPG/GIF images to the database? uploading these type of images creates the package file. can you try to convert it to BMP format instead and give it a try?

0
 
LVL 23

Accepted Solution

by:
OP_Zaharin earned 400 total points
ID: 35154260
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35154426
maximyshka,

Why not "link" to these files and avoid this issue forever?
0
 

Author Comment

by:maximyshka
ID: 35160698
Boag2000: I tried to link image: When I tried to change "OLE-Type" property of text box in the report from "embedded" to "linked" I got message that property is read-only and cannot be modified.
See attached file with screen shots

Main issue is how image is displayed in the form.

OP_Zaharin: I tried to change image type from JPG to BMP.  No difference.  I will try to reinstall PhotoEditor.  Also thought that this program causing issue.  Will let you know.  Thank you for information
Doc2-IMAGE-SCREEN-SHOTS.doc
0
 
LVL 23

Expert Comment

by:OP_Zaharin
ID: 35161434
maximyshka, what version of Office you are using?

if those 3 options provided in the Microsoft paper didn't work for you, try to consider to use "graphic filters". not all converters are installed by default. you need to have your Ms.Office installation CD with you:

1- click on "Windows Start" button
2- select "Control Panel" and select the "Add or Remove Programs"
3- select "Microsoft Office..." and click "Change"
4- select "Add or Remove" option and click "Next" button
5- set "Choose advanced customization of applications" to checked and click "Next" button
6- scroll to the bottom and double-click on "Office Shared Features"
7- double-click on "Converters and Filters". under the "Text Converters and Graphic Filters" list - double-click each nodes and select "Run from My Computer" for each converter or filter you want to use
8- click "Update" button when finish.

hope this helps.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35161737
Oy!

Don't use OLE...

Try something like this:



Access-BasicLinkFormReportImages.mdb
0
 

Author Comment

by:maximyshka
ID: 35162108
Thanks guys.  
After reinstalling Office 2000 it was working.
JPG not working, same story with package.  I converted to BMP.   Picture Crop is necessary

OP_Zaharin: thanks for Microsoft Support Information
0
 
LVL 23

Expert Comment

by:OP_Zaharin
ID: 35162321
no prob maximyshka. glad it helps.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I. Introduction In a previous article (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_6537-PaperPort-Upgrade-How-to-download-and-install-updated-versions-of-PaperPort-11-and-12.html) (now deprecated), I discussed how to upgrad…
I. Introduction In a previous article (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_6537-PaperPort-Upgrade-How-to-download-and-install-updated-versions-of-PaperPort-11-and-12.html) (now deprecated), I discussed how to upgrad…
The goal of the tutorial is to teach the user how to edit a basic portrait of someone. This tutorial shows how to edit two basic photographs, one of a car and one of a person.
The goal of the tutorial is to teach the user what gradient filters are and how to use them. When you have a photo and some part of the photo is either over exposed or under exposed, you use a gradient filter to help mask the need to touch up th…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now