Hello,
When I run a long query with aggregation cancel isn’t possible.
The message is: not supported.
It seems to be that it has to be called on another way because the manufacturer (Progress/OpenEdge) provided a KB:
----------------------------------------------------------------------------
The client code is written in Java.
The Connection object's abort() method is not supported.
Assume an SQL query is initiated from Java.
The Java code might look like the following:
Assume a Connection object, connected to the database, exists. The instantiated Connection object is called myConnection.
Assume the query is against the sports2000 database and the Customer table within the sports2000 database.
Statement myStatement = null;
String myQuery = "select * from PUB.Customer";
try {
myStatement = myConnection.createStatement().
ResultSet myRs = myStatement.executeQuery(myQuery );
/* The remainder of the try block processes what is returned by the SQL query. */
} CATCH {SQLException e) {
/* exception handling code */
} finally {
if (myStatement != null) { myStatement.close();}
}
Error Message
Defect/Enhancement Number
Cause
Resolution
In a separate thread, call the Statement object's cancel() method. The Statement object created in the thread that initiated the query must be passed to the separate thread that cancels the query. Assume myStatement is the Statement object. The separate thread should have a timeout associated with it to ensure it exits should the attempt to cancel the SQL query fail.
A call to the Statement object's cancel method looks like the following:
if (myStatement != null && !myStatement.isClosed())
{
myStatement.cancel();
}
-------------------------------------------------------------------------------------------------
Kind regards
Stefan Marquardt, Information Technology, IT Domain Direct | Hannover Re, Karl-Wiechert-Allee 50, 30625 Hannover, Germany | phone +49 511 5604 2799, mob +49 172 7292066, fax +49 511 5604 4799, ste...@ha... | www.hannover-re.com
==================================
Hannover Rück SE, Handelsregister (Commercial Register) Hannover HRB 6778 / E+S Rückversicherung AG, Handelsregister (Commercial Register) Hannover HRB 6117; für beide Gesellschaften gilt (applicable to both companies): Karl-Wiechert-Allee 50, 30625 Hannover, Germany; Sitz (registered office) der Gesellschaften: Hannover; Aufsichtsrat (Supervisory Board): Herbert K. Haas (Vorsitzender/Chairman); Vorstand (Executive Board): Ulrich Wallin (Vorsitzender/Chairman), Sven Althoff*, Claude Chèvre*, Jürgen Gräber*, Dr. Klaus Miller, Dr. Michael Pickel, Roland Vogel (*nur Mitglied des Vorstands der Hannover Rück SE/member of the Hannover Rück SE Executive Board only)
|