473,320 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

DB2 Blob

Hi.

I'm trying to retrieve blob obect from DB2 database using
COM.ibm.db2.jdbc.net.DB2Driver driver.
When i' m trying to get Blob from result set (resultSet.getBlob(1)) i
got this exception:
java.lang.AbstractMethodError:
COM.ibm.db2.jdbc.net.DB2ResultSet.getBlob(I)Ljava/sql/Blob;

What is the problem? How can i retrieve blob using this driver?
Thanx,
Alan.

Nov 14 '05 #1
4 8932
I solved the problem. I added resultSet.getBinaryStream(1) instead of
resultSet.getBlob(1).
alan

Nov 14 '05 #2
alan_sec wrote:
Hi.

I'm trying to retrieve blob obect from DB2 database using
COM.ibm.db2.jdbc.net.DB2Driver driver.
When i' m trying to get Blob from result set (resultSet.getBlob(1)) i
got this exception:
java.lang.AbstractMethodError:
COM.ibm.db2.jdbc.net.DB2ResultSet.getBlob(I)Ljava/sql/Blob;


Have you tried using the COM.ibm.db2.jdbc.app.DB2Driver?

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Nov 14 '05 #3
Also, see the sample applications in "sqllib/samples/java/jdbc|sqlj".
The "DtLob" application shows how to use LOBs.

--
--------------------
Larry Menard
"Defender of Geese and of All Things Natural"
"Knut Stolze" <st****@de.ibm.com> wrote in message
news:dl**********@lc03.rz.uni-jena.de...
alan_sec wrote:
Hi.

I'm trying to retrieve blob obect from DB2 database using
COM.ibm.db2.jdbc.net.DB2Driver driver.
When i' m trying to get Blob from result set (resultSet.getBlob(1)) i
got this exception:
java.lang.AbstractMethodError:
COM.ibm.db2.jdbc.net.DB2ResultSet.getBlob(I)Ljava/sql/Blob;


Have you tried using the COM.ibm.db2.jdbc.app.DB2Driver?

--
Knut Stolze
DB2 Information Integration Development
IBM Germany

Nov 14 '05 #4

"alan_sec" <ak*****@yahoo.com> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
I solved the problem. I added resultSet.getBinaryStream(1) instead of
resultSet.getBlob(1).
alan

If I'm not mistaken, getBlob() is only available in JDBC 2.0 and above and
the driver you were using only supports JDBC 1.2.2. Therefore, you had to
use getBinaryStream() instead of getBlob(). The other option is to use a
newer driver with more functionality, as others have mentioned in their
replies to your question.

Rhino
Nov 14 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Carolyn Longfoot | last post by:
Help! This is driving me crazy... I'm trying to read a BLOB from a db and display it in a browser, like so: $query="SELECT blob from table where blob_id=9"; $result=mysql_query($query);...
3
by: hamvil79 | last post by:
I'm implementig a java web application using MySQL as database. The main function of the application is basically to redistribuite documents. Those documents (PDF, DOC with an average size around...
15
by: Daniel Schuchardt | last post by:
Hi @ all, i'm sure there was a psql-function to transfere my Blob-Data to the server but I can't remember. I have a script like this : UPDATE xy SET z = lo_import('localpath_and_file'); ...
3
by: Carmine | last post by:
I have to add a date column to a db2/zos table with a blob column. Can I rename the blob table to old, create a new table with the date column, then insert/select the data from the old table? ...
0
by: Paul Kennedy | last post by:
I have a situation where I am utilizing code from MSDN to insert XLS files into a Microsoft Access Table in a column of Ole Object using VBA and DAO. That code also provides me with a method to...
1
by: Markusek Peter | last post by:
Hi, I'm using MySQLDriverCS. I've got no problem to store BLOB into database, but I can't get it back(save to file). Problem is with DataTable(returns string:( ) My code: -- DataTable dt = new...
0
by: Biztalk Migration | last post by:
I am new to using BLOB with oracle stored proc. I dont knw how to set the size of the buffer which seems to overflow no matter what i used to pass it. I am getting an error ...
2
by: Vinciz | last post by:
hi guys... im new in java and i would love to learn some of these... basically i got a sample code to retrieve the blob from the mysql. however, i dont really know what to do with these...
9
by: matt | last post by:
hello, im doing my first ASP.NET app that inserts & retrieves files from Oracle (no need for a discussion on *that*!). i learned first-hand of the somewhat awkward technique for inserting...
4
by: skunapareddy | last post by:
I am needing to read a blob from database and pass it to another java program. I researched internet and found a program that reads a file on the client pc and gives bytes, but when I modified the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.