insert image to access db

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
maximyshkaAsked:
Who is Participating?
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
maximyshkaAuthor Commented:
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
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Again: I'm not sure what a "package" might be. What is a "package"?
0
 
maximyshkaAuthor Commented:
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
 
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:
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
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
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
 
maximyshkaAuthor Commented:
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
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
I really don't know what the answer is, sorry ...

mx
0
 
Jeffrey CoachmanMIS LiasonCommented:
<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
 
maximyshkaAuthor Commented:
Question was: how can I remove image from the package and insert it to the report
0
 
Jeffrey CoachmanMIS LiasonCommented:
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
 
maximyshkaAuthor Commented:
other ideas without 3rd parties programs.  Is this Access 2000 Issue or Windows Issue?
0
 
Jeffrey CoachmanMIS LiasonCommented:
Bothy...
 ...in my experience it is mostly effected by "Widows" file associations affecting "Office" functionality
0
 
OP_ZaharinCommented:
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
 
Jeffrey CoachmanMIS LiasonCommented:
maximyshka,

Why not "link" to these files and avoid this issue forever?
0
 
maximyshkaAuthor Commented:
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
 
OP_ZaharinCommented:
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
 
Jeffrey CoachmanMIS LiasonCommented:
Oy!

Don't use OLE...

Try something like this:



Access-BasicLinkFormReportImages.mdb
0
 
maximyshkaAuthor Commented:
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
 
OP_ZaharinCommented:
no prob maximyshka. glad it helps.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.