aspose file tools*
The moose likes JDBC and the fly likes How to instantiate Blob? 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 "How to instantiate Blob?" Watch "How to instantiate Blob?" New topic
Author

How to instantiate Blob?

Darren Alexandria
Ranch Hand

Joined: Aug 17, 2007
Posts: 185
Good day!

To instantiate something, (if I am not mistaken) the code will be:


Now I am trying it on the Blob:


But when I do this, I get a red line under it which says that:

"Cannot instantiate the type Blob".

I am using MS SQL Server.

Thanks.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Blob is an interface. You can't create an instance of an interface. What are you trying to do: insert binary data or recover it?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Darren Alexandria
Ranch Hand

Joined: Aug 17, 2007
Posts: 185
Thanks for the reply. I saw an example for MySQL with that type of instantiation so I thought it would work on mine. Anyways, thanks for the info. I am trying to insert binary data, specifically a text file in the database.


Thanks again.
Darren
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to instantiate Blob?