File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Retrive column of type 'image' Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Retrive column of type Watch "Retrive column of type New topic

Retrive column of type 'image'

Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
I have a column in MS SQL - Server database with data type 'image', but it has a chunk of text stored in a binary format. Can any one throw light on retrieving the values of this column.

Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33102

You can use rs.getBlob() or rs.getBinaryStream() to get the result. One or two databases call their binary data column "image" even though it is misleading.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Retrive column of type 'image'
It's not a secret anymore!