By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,635 Members | 911 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,635 IT Pros & Developers. It's quick & easy.

Huge file size

P: n/a
I'm building a table and form which includes a photograph. The image size
of each photograph is about 50k. There are going to be about 500 records.
I have so far linked a photograph to the first 50 records and the saved
file is over 500Mg. Is there a better way of doing this? I have already
compacted the database and it makes no difference to its size.

Thank you

Nigel Ball
Nov 12 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
On Sun, 5 Oct 2003 10:53:31 +0100 in comp.databases.ms-access, "Nigel
Ball" <nb*@blueyonder.co.uk> wrote:
I'm building a table and form which includes a photograph. The image size
of each photograph is about 50k. There are going to be about 500 records.
I have so far linked a photograph to the first 50 records and the saved
file is over 500Mg. Is there a better way of doing this? I have already
compacted the database and it makes no difference to its size.


A jpeg may be small on the disk but it's compressed, when you shove
one into a database it will store not only the jpeg but a bitmap
representation as well. It shouldn't do as you're linking rather than
embedding but it shows how really poor databases are at images.

What I do is store the path to a picture in a text field, an example
is here:
http://www.trevor.easynet.co.uk/downloads/Images.zip

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #2

P: n/a
store the PATH to the picture file. Just put all the pictures in a
directory on the same machine as the backend... otherwise, yes, your
database is going to get huge. Larry Linson has a FAQ on all that
somewhere...
Nov 12 '05 #3

P: n/a
On 05 Oct 2003 Trevor Best <bouncer@localhost> wrote in
news:c9********************************@4ax.com:

[storing pictures in a db]
What I do is store the path to a picture in a text field, an
example is here:
http://www.trevor.easynet.co.uk/downloads/Images.zip


Sounds like a solution to what I'm trying to do at the moment.
Unfortunatly I can't open the db in that archive as it says it is saved
in a later version that what I'm using (2000). Would it be possible for
you to convert it back and then either put it on the web again or e-
mail it to me?

On a different, but related, note, how do you put something on a form
to allow people to browse through their disk to find the file they
want?

--
Graham Drabble
If you're interested in what goes on in other groups or want to find
an interesting group to read then check news.groups.reviews for what
others have to say or contribute a review for others to read.
Nov 12 '05 #4

P: n/a
On Sun, 05 Oct 2003 14:46:11 +0100 in comp.databases.ms-access, Graham
Drabble <gr************@lineone.net> wrote:
Sounds like a solution to what I'm trying to do at the moment.
Unfortunatly I can't open the db in that archive as it says it is saved
in a later version that what I'm using (2000). Would it be possible for
you to convert it back and then either put it on the web again or e-
mail it to me?
sure, no problem :-)
http://www.trevor.easynet.co.uk/down...Images2000.zip
On a different, but related, note, how do you put something on a form
to allow people to browse through their disk to find the file they
want?


You mean the file open dialog? It's in that database, in module
basOpenFileDlg and is called from the main form.

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #5

P: n/a
Graham Drabble <gr************@lineone.net> wrote in message

On a different, but related, note, how do you put something on a form
to allow people to browse through their disk to find the file they
want?


Use the FileOpen code at mvps.org Ken Getz wrote it, so look for his name...
Nov 12 '05 #6

P: n/a
On 05 Oct 2003 Trevor Best <bouncer@localhost> wrote in
news:m6********************************@4ax.com:
On Sun, 05 Oct 2003 14:46:11 +0100 in comp.databases.ms-access,
Graham Drabble <gr************@lineone.net> wrote:
Sounds like a solution to what I'm trying to do at the moment.
Unfortunatly I can't open the db in that archive as it says it is
saved in a later version that what I'm using (2000). Would it be
possible for you to convert it back and then either put it on the
web again or e- mail it to me?


sure, no problem :-)
http://www.trevor.easynet.co.uk/down...Images2000.zip


Thanks.
On a different, but related, note, how do you put something on a
form to allow people to browse through their disk to find the file
they want?


You mean the file open dialog? It's in that database, in module
basOpenFileDlg and is called from the main form.


That's exactly what I wanted. Many thanks. My 30MB database just
shrank to 9.5MB using paths rather than OLE.

--
Graham Drabble
If you're interested in what goes on in other groups or want to find
an interesting group to read then check news.groups.reviews for what
others have to say or contribute a review for others to read.
Nov 12 '05 #7

P: n/a
On 05 Oct 2003 Trevor Best <bouncer@localhost> wrote in
news:m6********************************@4ax.com:
On Sun, 05 Oct 2003 14:46:11 +0100 in comp.databases.ms-access,
Graham Drabble <gr************@lineone.net> wrote:
Sounds like a solution to what I'm trying to do at the moment.
Unfortunatly I can't open the db in that archive as it says it is
saved in a later version that what I'm using (2000). Would it be
possible for you to convert it back and then either put it on the
web again or e- mail it to me?


sure, no problem :-)
http://www.trevor.easynet.co.uk/down...Images2000.zip


I've just realised that I broke a report doing this. The paths are
for scans of signiturs that can be used on certificates. Not everyone
has a signiture scanned so it can be null.

What I've got is a report showing all the adults. As part of that I
want to show the signitures for those that had them. With the OLE
field that was easy, I simply used a Bound Object Frame. With this
method I can't do it.

The table is called 'leaders' and the field 'SignitureFile'. What
I've tried so far is to put a picture object (called 'pic') in the
report with (none) in the Picture attribute. I'm then going to set
pic.picture using OnOpen.

Private Sub Report_Open(Cancel As Integer)
pic.Picture = [SignitureFile]
End Sub

Gives the error

"Run error 2465

Can't find the field SignitureFile referred to in your expression
"

I also have a text box on the report called "SigFile" that has =IIf
([SignitureFile],[SignitureFile],"(none)") as a Control Source.

Private Sub Report_Open(Cancel As Integer)
pic.Picture = [SigFile]
End Sub

gives

"Run Time error 13

Type mismatch
"

and

Private Sub Report_Open(Cancel As Integer)
pic.Picture = "'" & [SigFile] & "'"
End Sub

gives

"Run time error 2427

You entered an expression that has no value"

Any suggestions as to the right way of doing this would be gratefully
accepted.

--
Graham Drabble
If you're interested in what goes on in other groups or want to find
an interesting group to read then check news.groups.reviews for what
others have to say or contribute a review for others to read.
Nov 12 '05 #8

P: n/a


If there is no control bound to a field in a report then sometimes Access skips retrieving the data. Try
binding a text control to the field (you can hide this control).
--
__________________________________________________ _____
http://www.ammara.com/
Image Handling Components, Samples, Solutions and Info

Graham Drabble <gr************@lineone.net> wrote:
On 05 Oct 2003 Trevor Best <bouncer@localhost> wrote in
news:m6********************************@4ax.com :
On Sun, 05 Oct 2003 14:46:11 +0100 in comp.databases.ms-access,
Graham Drabble <gr************@lineone.net> wrote:
Sounds like a solution to what I'm trying to do at the moment.
Unfortunatly I can't open the db in that archive as it says it is
saved in a later version that what I'm using (2000). Would it be
possible for you to convert it back and then either put it on the
web again or e- mail it to me?


sure, no problem :-)
http://www.trevor.easynet.co.uk/down...Images2000.zip


I've just realised that I broke a report doing this. The paths are
for scans of signiturs that can be used on certificates. Not everyone
has a signiture scanned so it can be null.

What I've got is a report showing all the adults. As part of that I
want to show the signitures for those that had them. With the OLE
field that was easy, I simply used a Bound Object Frame. With this
method I can't do it.

The table is called 'leaders' and the field 'SignitureFile'. What
I've tried so far is to put a picture object (called 'pic') in the
report with (none) in the Picture attribute. I'm then going to set
pic.picture using OnOpen.

Private Sub Report_Open(Cancel As Integer)
pic.Picture = [SignitureFile]
End Sub

Gives the error

"Run error 2465

Can't find the field SignitureFile referred to in your expression
"

I also have a text box on the report called "SigFile" that has =IIf
([SignitureFile],[SignitureFile],"(none)") as a Control Source.

Private Sub Report_Open(Cancel As Integer)
pic.Picture = [SigFile]
End Sub

gives

"Run Time error 13

Type mismatch
"

and

Private Sub Report_Open(Cancel As Integer)
pic.Picture = "'" & [SigFile] & "'"
End Sub

gives

"Run time error 2427

You entered an expression that has no value"

Any suggestions as to the right way of doing this would be gratefully
accepted.

--
Graham Drabble
If you're interested in what goes on in other groups or want to find
an interesting group to read then check news.groups.reviews for what
others have to say or contribute a review for others to read.


Nov 12 '05 #9

P: n/a
On Mon, 06 Oct 2003 12:02:18 +0100 in comp.databases.ms-access, Graham
Drabble <gr************@lineone.net> wrote:
Private Sub Report_Open(Cancel As Integer)
pic.Picture = [SignitureFile]
End Sub

Gives the error

"Run error 2465

Can't find the field SignitureFile referred to in your expression
Try the relevant section's print event.
I also have a text box on the report called "SigFile" that has =IIf
([SignitureFile],[SignitureFile],"(none)") as a Control Source.

Private Sub Report_Open(Cancel As Integer)
pic.Picture = [SigFile]
End Sub

gives

"Run Time error 13

Type mismatch


=IIf(Len("" & [SignitureFile]),[SignitureFile],"(none)")
--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.