Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

insert image to access db

Posted on 2011-03-14
21
Medium Priority
?
430 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 85
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 85
ID: 35136721
Again: I'm not sure what a "package" might be. What is a "package"?
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 

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 400 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
 
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 1600 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

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses

581 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