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

diff between two methods to write the blob into the db

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

We can store the blob in db using any of the following,

1. using setBlob method

2. Inserting emptyBlob()
selecting that particular blob row
get the binary output stream
insert into db

Whats the difference between these two methods?
Anyother way to insert the blob into db?

Thankx in advance.

Regards,
Karthik
 
karthik venkatesan
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry, I have written setBinaryStream instead of setBlob method in the above post.

Any help will be appreciated...

Thanks

Regards,
Karthik
 
author & internet detective
Posts: 41381
853
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Karthik,
You can actually use setBlob() or setBinarySteam(). Personally, I prefer setBinaryStream as it doesn't tie me to the database as closely.

For the future, note that you can edit a post by clicking the paper and pencil icon on the line with the post's date and time.
 
karthik venkatesan
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thankx jeanne, thanks a lot for the info.

Regards,
Karthik
[ June 08, 2005: Message edited by: karthik venkatesan ]
 
If we don't do the shopping, we won't have anything for dinner. And I've invited this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic