470,573 Members | 1,619 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,573 developers. It's quick & easy.

Inserting pictures on msaccess database

I spend a lot of time making 2 thousand pictures and saving them as an
article name. jpg.

I have a table with the article name and name of the file in jpg (format).

How can I make an instant attach to the database instead of adding picture
record by record... is any way possible to do that on msaccess?

Thank you
Nov 12 '05 #1
3 2522
Pardon my extra words, you appear to be from Portugal, I hope the extra
words will make the translation easier

It is far better to save the pictures as pictures and not in an Access mdb.
Access is bad at saving pictures in an mdb

try, this

Save the path to the pictures in the mdb and do this when you need a
picture:

Set MySet = CurrentDb().OpenRecordset("select * from [tblIMAGES] where
[PicName] = '" & MyName & "';", dbOpenSnapshot)
Select Case MySet.RecordCount
Case 1
Me.ctlItemPic.picture = MySet!PATH
Case Else
Me.ctlItemPic.picture = "C:\default.bmp"
End Select

John Bickmore
www.BicycleCam.com
www.Feed-Zone.com

"Pedro Maria Ferro da Cunha" <pf*****@iol.pt> wrote in message
news:10**************@news.iol.pt...
I spend a lot of time making 2 thousand pictures and saving them as an
article name. jpg.

I have a table with the article name and name of the file in jpg (format).

How can I make an instant attach to the database instead of adding picture
record by record... is any way possible to do that on msaccess?

Thank you

Nov 12 '05 #2
If it has to go into a table, then I can think of only two ways, record by
record, or using the Dir() function to loop through the folder they are
stored in, then adding them record by record through a recordset in code.
Perhaps you're better off only keeping the path to the image in the DB?

Mike Storr

"Pedro Maria Ferro da Cunha" <pf*****@iol.pt> wrote in message
news:10**************@news.iol.pt...
I spend a lot of time making 2 thousand pictures and saving them as an
article name. jpg.

I have a table with the article name and name of the file in jpg (format).

How can I make an instant attach to the database instead of adding picture
record by record... is any way possible to do that on msaccess?

Thank you

Nov 12 '05 #3
Download the sample databases from http://accdevel.tripod.com. They
illustrate three approaches to handling images in Access. You can embed the
programmatic method for embedding or linking in a VBA loop using the DIR
statement to find the names of the files. You may want to review the
included article which discusses considerations in choosing the method
appropriate to use in your application.

Larry Linson
Microsoft Access MVP
"Pedro Maria Ferro da Cunha" <pf*****@iol.pt> wrote in message
news:10**************@news.iol.pt...
I spend a lot of time making 2 thousand pictures and saving them as an
article name. jpg.

I have a table with the article name and name of the file in jpg (format).

How can I make an instant attach to the database instead of adding picture
record by record... is any way possible to do that on msaccess?

Thank you

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Fons Dijkstra | last post: by
3 posts views Thread by Brad Burke | last post: by
reply views Thread by bbrewder | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.