| Author |
getBytes() or getBlob() fails when resultSet is larger than 1
|
Cory Tucker
Greenhorn
Joined: Jan 05, 2007
Posts: 2
|
|
Hi, I have a table setup with a column of type BLOB. When I execute a query on the table which returns only one result, I can get the blob data no problem. However, when I execute a query that returns a result set with more than one result, the second time the getBlob() or getBytes() method is called it throws a SQLException and gives the following error: ERROR XCL30: An IOException was thrown when reading a 'BLOB' from an InputStream. Here is a snippet of the code I am using: Does anyone know what might be going wrong? thanks --Cory
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26168
|
|
Cory, Welcome to JavaRanch! Just to confirm, were you able to get just the second icon if you do a query so that it is the only result? This rules out data as being the cause. What database/driver are you using?
|
[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
|
 |
Cory Tucker
Greenhorn
Joined: Jan 05, 2007
Posts: 2
|
|
Correct. If I do a query which restricts the resultSet size to 1, then I can get the data just fine. The DB I am using is JavaDB (aka Derby or Cloudscape). I believe the version is 10.2 (whatever was just released on 12/20/06).
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26168
|
|
Ok. That looks like a message specific to Derby.
Maybe a network timeout? I haven't used Derby, so I can't provide more specific advice on this.
|
 |
 |
|
|
subject: getBytes() or getBlob() fails when resultSet is larger than 1
|
|
|