• 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
  • 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

Image insertion in database

 
Ranch Hand
Posts: 79
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
code to insert image in DataBase
Table contain two column first is of BLOB type and second has integer type
This is my code

when i compile this p=code it show exception

unimplemented and unsupported conversion exception
this code runs pretty well on other computer
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gursewak: please UseCodeTags (←click) when posting to these forums. I've done it for you this time, but in future...

I also split one long line of yours, as they often cause display problems.

Winston
 
Winston Gutkowski
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Gursewak Singh wrote:when i compile this p=code it show exception


Could you also please post the exact exception, including any stacktrace that came with it (the first 10-20 lines is usually enough if it's very long) along with an indication of exactly which line in your code it occurred.

Thanks.

Winston

PS: Welcome to JavaRanch.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why did you do the

setInt(2,1)

?
 
Marshal
Posts: 79259
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It means to set the 2nd position in the statement to an int value 1.

Or similar.
 
Kushal Khot
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:It means to set the 2nd position in the statement to an int value 1.

Or similar.



Yes but, why do you need to do that ? is it ok, if it is eliminated ?
 
Campbell Ritchie
Marshal
Posts: 79259
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kushal Khot wrote: . . . Yes but, why do you need to do that ? is it ok, if it is eliminated ?

No idea.
 
reply
    Bookmark Topic Watch Topic
  • New Topic