This week's book giveaway is in the Kotlin forum. We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line! See this thread for details.
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
If you have already extracted the byte array for the image, then try
You can also look at setBlob() method of the xxxxxxxxStatement object you use.
"It is almost always answered in the API" - Murali Nanchala
Anirban dutta
Ranch Hand
Posts: 89
posted 15 years ago
I have tried out the method of the setBlob. But the problem is how to get the reference of the Blob interface. I couldn't find any code which returns the Blob's reference. So I tried it in a different way: I inserted a empty image into the database by empty_blob() function of SQL. Then I used the setBytes of the blob interface to set the image bytes in it. But it gave an runtime exception: java.lang.AbstractMethodError. What could be the problem. Please help me in solving it.