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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Store file in access

 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator

using the above code i could read the file.Now can anyone guide me to store it in access or oracle database.Thanx in advance.

[added code tags]
[ September 21, 2005: Message edited by: Jeanne Boyarsky ]
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Visu,
You have the right idea with the commented out part. Good start!

I think you need to use a PreparedStatement since you are inserting a BLOB. It seems tough to represent a file in a SQL query. You can pass a byte[] or ByteArrayInputStream to the prepared statement.
 
visu Nekk
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
hi Jeanne,

i have tried out with prepared statement but the microsoft access driver does'nt support prepared statement.can u help me anyother way out?
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Visu,
Please don't post duplicate threads about the same question. Continue conversation in your other thread.

Thanks,
Jeanne
JDBC Forum Bartender
 
Not looking good. I think this might be the end. Wait! Is that a tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic