473,327 Members | 2,065 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,327 software developers and data experts.

Storing a JPEG within a database

NeoPa
32,556 Expert Mod 16PB
Since some of you guys know so much about different areas of Access, I'll ask a question I'd previously given up on.
I have a company logo which is currently stored as a .Jpg file on the network.
I show it on reports by including an 'Image' type field in the reports which links to the name of the file.
My question is :-

How can I store this in a table in an Access database such that it doesn't have to load it from the file every time it is accessed?

I need to know :
1. How to define the field where it is stored.
2. How to use it in a report.

I suspect that this may be something that's been done before but I got stuck when I tried it.
Oct 25 '06 #1
12 4799
Tanis
143 100+
This might help.

http://support.microsoft.com/kb/198463/en-us
Oct 25 '06 #2
NeoPa
32,556 Expert Mod 16PB
This might help.

http://support.microsoft.com/kb/198463/en-us
Thanks Tanis.

I checked out the link but it pretty well describes my current position.
What I'm trying to get to, is to store the image within the database and therefore avoid the delay of loading the image into memory every time I run any report.
Maybe it's just not supported & I will have to leave it as it is :-(.
Oct 25 '06 #3
Killer42
8,435 Expert 8TB
Thanks Tanis.

I checked out the link but it pretty well describes my current position.
What I'm trying to get to, is to store the image within the database and therefore avoid the delay of loading the image into memory every time I run any report.
Maybe it's just not supported & I will have to leave it as it is :-(.
If there is a noticeable delay, perhaps your image file is larger than necessary. Are you taking a large image and resizing it to display? If so, you might save time by saving a small copy and using that.
Oct 25 '06 #4
NeoPa
32,556 Expert Mod 16PB
That's a good idea Killer - but I have already implemented that.
The delay is usually between 3 and 10 seconds, so not a mega-problem in itself.

My main problem is that I don't like things done imperfectly.
To my mind the 'correct' way to implement this is stored in a table in my database. It's like a burr in my side :-(.
In truth, I can live without this, but the answer would certainly make me happier.

It goes without saying that I appreciate all attempts at help, whether or not they are the 'ultimate answer'. So thanks guys.
Oct 25 '06 #5
MMcCarthy
14,534 Expert Mod 8TB
So you noticed I'm still up. I'm supposed to be working. Ha Ha

Anyway to store a file of any time in the database, image or otherwise, you need to create an ole object type field. You can then store the file there as a linked or embedded file.
Hope this helps ...
Oct 25 '06 #6
MMcCarthy
14,534 Expert Mod 8TB
By the way I should mention you can't attach this type of file to an image frame you will have to use a bound or unbound object frame.



So you noticed I'm still up. I'm supposed to be working. Ha Ha

Anyway to store a file of any time in the database, image or otherwise, you need to create an ole object type field. You can then store the file there as a linked or embedded file.
Hope this helps ...
Oct 25 '06 #7
NeoPa
32,556 Expert Mod 16PB
I noticed easily because you sneaked in a post before mine again :-( - in Killer's thread - lol.
Anyway, thanks for the input, I'll see if I can make it work for me tomorrow at work. It's not an area of great familiarity for me so I'll have to take it simple steps at a time.

Oh look number 4 on the leader board - Xlnt.
Oct 26 '06 #8
MMcCarthy
14,534 Expert Mod 8TB
I noticed easily because you sneaked in a post before mine again :-( - in Killer's thread - lol.
Anyway, thanks for the input, I'll see if I can make it work for me tomorrow at work. It's not an area of great familiarity for me so I'll have to take it simple steps at a time.

Oh look number 4 on the leader board - Xlnt.
Keep going the way you're going and you'll soon be fighting me for top spots. I wasn't as prolific as usual today as I had to get some work done so any time you want to jump in you're more than welcome. I don't want to leave queries orphaned without any response if possible.

Talk to you soon.
Oct 26 '06 #9
NeoPa
32,556 Expert Mod 16PB
I look forward to that.
I'll do what I can in these forums - I can't promise too much as time is an issue but I'll do what I can.
Oct 26 '06 #10
NeoPa
32,556 Expert Mod 16PB
That worked perfectly.
Thanks for that MMcCarthy.

Now I've just got to copy and paste my new Unbound Object field into the other 66 reports in my main DB - I'll get on to the other DBs when that one's all done.

I've now had two long term problems solved on these forums so I'm quite impressed.
I'll come here again :-)
Oct 26 '06 #11
MMcCarthy
14,534 Expert Mod 8TB
That worked perfectly.
Thanks for that MMcCarthy.

Now I've just got to copy and paste my new Unbound Object field into the other 66 reports in my main DB - I'll get on to the other DBs when that one's all done.

I've now had two long term problems solved on these forums so I'm quite impressed.
I'll come here again :-)
Why not just create a table with OleID Number field and OleObject Text Field. Just store the one record and it will give you the opportunity to add later.

Then you just have to add a number field to other tables 'OleID' as foreign key to this table. It will reduce size considerably as object only linked once. You can also default this field to value in OleID.
Oct 26 '06 #12
NeoPa
32,556 Expert Mod 16PB
I did think of something along those lines M, but that would actually involve more updating than what I've done (already finished now) in my case. Also, I use some queries for output to Reports as well as to other destinations so wouldn't want it in the query.
I'm happy with a DLookUp() within my Unbound Object field included in all my reports.
The object is stored only once in a control table with just the 1 record so performance is swift.
All-in-all overheads much reduced and thanks for all your help.
Oct 26 '06 #13

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

Similar topics

3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
3
by: Dave Smithz | last post by:
Hi There, Being quite new to MS-SQL I would like to ask if there is a general opinion of what approach should be taken to storing things like external documents and images in databases. ...
7
by: Dave | last post by:
I have a system that basically stores a database within a database (I'm sure lots have you have done this before in some form or another). At the end of the day, I'm storing the actual data...
11
by: bissatch | last post by:
Hi, I am trying to upload an image, create a new file based on that image and then store the base64 encoded image data in a database. I dont really know where my code is going wrong so I will...
2
by: bissatch | last post by:
Hi, I am trying to write script that is run when a form is submitted. The form contains an image input field and when submitted, the image is uploaded, resized and added as binary information to...
4
by: Rednelle | last post by:
Greetings all, As a newbie, using Access 2000, I would appreciate advice on the best way to include pictures. I have developed a 'Home Inventory' database which can include jpeg thumbnails of...
2
by: Manish Naik | last post by:
Hi, Using ASP.Net, I want to store and retrive documents (Word, excel, etc) from SQL Server 2000 database. I have tried image type data field, but could not succed. Can any one help me please. ...
1
by: RAB | last post by:
I want to scan documents and then store them in an Access database. What file type would I want to scan the document as? Would I want to store the document file in the database or a path to the...
3
by: Lucky_Syringe | last post by:
I wrote this script to display different files from a database and properly display them by their respective MIME types. I have two questions: the first is that it just so happens not to work, and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.