Hi all,
I'm having a problem with the type 4 JDBC driver over DB2 v8.1 on
Linux. We've recently begun to use Blobs to store documents in our
table structure. Problem is: we're able to retrieve some (but not all)
such documents by invoking ResultSet.getBi naryStream() or, alternately,
ResultSet.getBl ob() followed by Blob.getBinaryS tream().
For some (as yet undetermined) reason, attempting to retrieve some
documents using either of the aforementioned methods fails with
"Invalid operation: result set is closed" even before we've tried to
iterate over the result set with next(). Has anyone encountered a
similar problem? If so, how did you work around it?
Thanks in advance! 3 5909
skykeys wrote: Hi all,
I'm having a problem with the type 4 JDBC driver over DB2 v8.1 on Linux. We've recently begun to use Blobs to store documents in our table structure. Problem is: we're able to retrieve some (but not all) such documents by invoking ResultSet.getBi naryStream() or, alternately, ResultSet.getBl ob() followed by Blob.getBinaryS tream().
For some (as yet undetermined) reason, attempting to retrieve some documents using either of the aforementioned methods fails with "Invalid operation: result set is closed" even before we've tried to iterate over the result set with next(). Has anyone encountered a similar problem? If so, how did you work around it?
Do you have auto-commit turned off?
I would think that BLOBs are retrieved in chunks by JDBC/CLI, and that in
between the retrieval of the chunks an implicit commit is run.
--
Knut Stolze
Information Integration Development
IBM Germany / University of Jena
Knut Stolze wrote: skykeys wrote:
Hi all,
I'm having a problem with the type 4 JDBC driver over DB2 v8.1 on Linux. We've recently begun to use Blobs to store documents in our table structure. Problem is: we're able to retrieve some (but not all) such documents by invoking ResultSet.getBi naryStream() or, alternately, ResultSet.getBl ob() followed by Blob.getBinaryS tream().
For some (as yet undetermined) reason, attempting to retrieve some documents using either of the aforementioned methods fails with "Invalid operation: result set is closed" even before we've tried to iterate over the result set with next(). Has anyone encountered a similar problem? If so, how did you work around it? Do you have auto-commit turned off?
No, I did not. But I will try it now.
I would think that BLOBs are retrieved in chunks by JDBC/CLI, and that in between the retrieval of the chunks an implicit commit is run.
Yes, this makes sense to me too. I'll keep you posted. Thanks for the
reply.
-- Knut Stolze Information Integration Development IBM Germany / University of Jena
Thanks, Knut. After setting Connection.auto Commit(false), the
exception has gone away but (I believe) the result set is still closed
since ResultSet.next( ) returns "false" for the offending rows. If it
helps, I'm using the type 4 driver (db2jcc.jar and
db2jcc_license_ cu.jar) in Tomcat.
Perhaps this is a character set issue? Hmmm. I've got one more thing
to try...hold on.
No, this is not a character set issue. In trying to isolate the
problem, I've written a small command line program to load the driver,
instantiate a connection, and select Blob content from the offending
columns and it works!
However, the same code executed in a servlet container yields closed
result sets. Perhaps this is a threading or security manager issue?
Until now, I thought DB2 Connection objects were threadsafe. Usually,
I instantiate one connection per servlet context and bind it to each
session in an HttpSessionList ener. I may have to rethink this
approach.
If this is a security manager issue, then I'll have to devise a test
for that. I'll continue to investigate and keep you posted.
Thanks again! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Martin Ziebart |
last post by:
Hi !
The following PHP-Code:
>> $conn=pg_connect ($conn_string);
>> $query=pg_exec ($conn, $sql_statement); // it's pg_query for PHP
>4.2.0
>> pg_close ($conn);
|
by: William Drew |
last post by:
REQUEST FOR DISCUSSION (RFD)
unmoderated group comp.databases.mysql
This is an invitation to discuss the following proposal to create newsgroup
comp.databases.mysql. Please note that YOU CANNOT VOTE NOW; you may be
able to vote on a version of this proposal later. See the PROCEDURE section
below if you need information about how the discussion works.
PLEASE POST ANY FOLLOWUPS TO THE NEWSGROUP NEWS.GROUPS.
|
by: Felix McAllister |
last post by:
Hi,
When using win32com.client, how do you test for a 'nothing' com object as you can in VB? I have an example here when using ADO to loop over multiple recordsets returned from a query. I get the following error:
Traceback (most recent call last):
File "C:\dev\python\MySamples\dbtest.py", line 14, in ?
rs.MoveFirst()
File "C:\Python23\lib\site-packages\win32com\client\dynamic.py", line 460, in __getattr__
raise AttributeError, "%s.%s" %...
|
by: Christian McArdle |
last post by:
REQUEST FOR DISCUSSION (RFD)
unmoderated group comp.os.ms-windows.programmer.64bit
This is a formal Request For Discussion (RFD) to create
comp.os.ms-windows.programmer.64bit as an unmoderated world-wide Usenet
newsgroup dedicated to the discussion of Microsoft Windows 64-bit
programming. This is not a Call for Votes (CFV); you cannot vote at
this time. Procedural details appear below. All followup discussion
should be crossposted to...
|
by: Tom.PesterDELETETHISSS |
last post by:
Hi,
I think this question requires an in depth understanding of how a browser
cache works. I hope I can reach an expert here.
I may have found a quirk in the asp.net documentation or I don't understand
what the SetAllowResponseInBrowserHistory does.
While researching caching I tried the code sample at the following page :
http://msdn2.microsoft.com/library/97wcd0a4(en-us,vs.80).aspx
| |
by: Nuno Morgadinho |
last post by:
Hello all,
I'm messing around with the Server Programming Interface and the
particular example presented at:
http://www.postgresql.org/docs/current/interactive/spi-examples.html
Ideally, I would want to make the example function return the
information as a "set" and not through elog() so I can later access it
and print it using PHP.
|
by: alistair_henderson |
last post by:
Morning All,
I have some code for a website which uses 'window.open' to simulate
modal dialog boxes. I use the window.closed property to decide if the
window object exists at various points. This has been fine until last
week when I started getting javascript 'Permission Denied' errors when
I try to access this property.
I suspect that a windows update has caused this somehow, as this code
has not changed for a very long time. Can...
|
by: praveen |
last post by:
Hi,
I am using nested resultsets to execute queries on two different
tables.
The code structure is:
stmt1 = conn.createStatement();
rs1 = stmt1.executeQuery(query1);
while (rs1.next()) {
.....
stmt2 = conn.createStatement();
|
by: JRough |
last post by:
I tried to pass the $result from a mysql_query in a url like this line
Header("Location:clm_historyXL.php?_result=".$result);
but on the redirect location clm_history.php page I get an error on
this line:
$result = $_POST;
I need the $result on the clm_historyXL page to print a list to excel
because
of a header already being sent.
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |