Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Insert file as Attachment in Access 2007

 
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tom Griffith
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

why dont you use a file upload utility to upload that file and after the file gets uploaded, you send him the link
 
Attractive, successful people love this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic