aspose file tools*
The moose likes JDBC and the fly likes java.sql.* Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.sql.*" Watch "java.sql.*" New topic
Author

java.sql.*

Jahnvi Vyas
Ranch Hand

Joined: May 03, 2006
Posts: 36
Hello,

In my web application I am using MySql as back-end. One of the column type in my table is BLOB. I am fetching some values in Blob of JSP tag and then passing those in sql query. But I am getting initialization error. Because as per java.sql.* package Blob is an interface. So that object cant be created for that.

So is there any way to initialize some values?? How to declare or use this type???

Thanks..

Jahnvi
Jignesh Patel
Ranch Hand

Joined: Nov 03, 2001
Posts: 626

it should be like this
class mydataclass implements Blob{
// all your blob related stuff
}
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30753
    
156

Jahnvi,
Often people use get/setBinaryStream to avoid the vendor specific implementations of BLOB.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.sql.*