This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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?
 
Similar Threads
Conversion Blob to Byte Array
Conversion Blob to Byte Array
Display BLOB contents to the client
How to convert FormFile into BLOB object?
inserting data in to blob...