Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC and the fly likes to retrieve data from an image type in ms sql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "to retrieve data from an image type in ms sql" Watch "to retrieve data from an image type in ms sql" New topic
Author

to retrieve data from an image type in ms sql

kiran manohar
Ranch Hand

Joined: Sep 28, 2003
Posts: 49
hi,
i am having a table in ms sqlserver 2000. i am having a column called photo of image datatype in it. i need to know how to insert a gif or jpeg in that column in sqlserver.then using jdbc i need to retrieve that image (jpeg/gif)and display in my Frame.
Regards
Kiranmanohar
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Not sure what the image data type is mapped to, but it might be a binary. Try ResultSet.getBinaryStream(int).
- Peter
 
GeeCON Prague 2014
 
subject: to retrieve data from an image type in ms sql