No reply, trying again

  • Thread starter Thread starter John Gavin
  • Start date Start date
J

John Gavin

I have been copying and pasting .jpg photographs to a
bound OBJ Frame field in my Access 2000 database. It has
been working perfectly with up to 500 photos copied and
pasted (all less than 200k each). The next step in the
operation after pasting is to go to a photo id field and
search for the next record using the next id number. But,
all of a sudden I'm getting an invalid argument error and
I can't do anything! I've tried rebooting but no change.
Can any one shed any light on this?? Thanks
 
I have been copying and pasting .jpg photographs to a
bound OBJ Frame field in my Access 2000 database. It has
been working perfectly with up to 500 photos copied and
pasted (all less than 200k each). The next step in the
operation after pasting is to go to a photo id field and
search for the next record using the next id number. But,
all of a sudden I'm getting an invalid argument error and
I can't do anything! I've tried rebooting but no change.
Can any one shed any light on this?? Thanks
Hi John,

It usually isn't a good idea to store the photos in the database
directly; it takes up too much space and can cause instability. With
your photos, you are up to 100Mb plus, which is getting fairly large for
Access. Most developers recommend just storing the path to the images
in a text field, and displaying them in an image control that way.

As far as the error goes, if you haven't made any code changes then your
database may be corrupt. Make a backup first! Then try compacting and
repairing it, or create a brand new database and import all the objects
into it.

Good luck,
 
Armen Stein said:
Hi John,

It usually isn't a good idea to store the photos in the database
directly; it takes up too much space and can cause instability. With
your photos, you are up to 100Mb plus, which is getting fairly large
for Access. Most developers recommend just storing the path to the
images in a text field, and displaying them in an image control that
way.

As far as the error goes, if you haven't made any code changes then
your database may be corrupt. Make a backup first! Then try
compacting and repairing it, or create a brand new database and
import all the objects into it.

Good luck,

I have to say I disagree that 100MB is large for Access, though I agree
that it's generally much better to store just the paths to the image
files in text fields. And the reason is that Access stores the images
in bitmap format, so John's 500 .jpg images, though each is under 200K
in its compressed JPEG format, are also being stored in completely
uncompressed format, and it wouldn't surprise me if his database is
pushing the 2GB limit.

John, how big is your database file now? If you've hit the limit, you
may get all sorts of weird behavior.
 
Once you get past this DB misbehavior, particularly if you determine it was
caused by the database bloat of storing photos as OLE Objects, you might
want to download the sample database illustrating three approaches to
handling images in Accesss from http://accdevel.tripod.com. There are
versions for Access 97 and for Access 2000 and later, and each download
contains an article discussing the three approaches and considerations in
choosing one. Two of the methods do not store images in OLE Objects and are,
therefore, not subject to the bloat that method incurs (as Armen and Dirk
have mentioned).

Larry Linson
Microsoft Access MVP
 
Back
Top