aspose file tools*
The moose likes JDBC and the fly likes Insert file as Attachment in Access 2007 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Insert file as Attachment in Access 2007" Watch "Insert file as Attachment in Access 2007" New topic
Author

Insert file as Attachment in Access 2007

Tom Griffith
Ranch Hand

Joined: Aug 06, 2004
Posts: 272
Hello. I guess the subject is pretty much my question. Is it possible to insert a file via PreparedStatement as an MS Access 2007 attachment? If i stream it into the field as clob/blob, I think it'll store it as binary and be useless to anybody using the file later. Thank you very much...I've seen next to nothing on this.
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Hi,

I suppose that the file you are storing contains binary characters, right ? If yes then BLOB field will certainly store binary data intact. Also, when you will fetch this file, you need to read it using java and manully store the file in a particular path.


Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
Tom Griffith
Ranch Hand

Joined: Aug 06, 2004
Posts: 272
hi...thank you. yeah, i was hoping that i wouldn't have to stream it back out of binary when the users use the database. it's essentially an archive for a mail file and i wanted to store the metadata in access text fields and then the attachment from the email body as an access 2007 attachment...then just give them the access db. this would enable the users to just detach the file from access sans any additional coding to convert it back out of binary. i just can't figure out if there is a way to do it programatically.
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Hi,

why dont you use a file upload utility to upload that file and after the file gets uploaded, you send him the link
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Insert file as Attachment in Access 2007