db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <de...@segel.com>
Subject RE: cancel a running query?
Date Fri, 10 Oct 2008 11:56:39 GMT
A rollback doesn't "cancel" a query. Meaning that you can't stop the query
until it completes.

The rollback will reverse the results of a transaction after the SQL
statement completes. A query is unaffected because its not a SQL statement
that changes the database. (query == SELECT, other statements UPDATE,DELETE,
INSERT, etc ... do change the data.)

So if you start  a query, there isn't a way to have some sort of query
timeout or call to prematurely end the query. (Perhaps you need to consider
threading your app...)



> -----Original Message-----
> From: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM]
> Sent: Thursday, October 09, 2008 9:09 PM
> To: Derby Discussion
> Subject: Re: cancel a running query?
> Rick Hillegas <Richard.Hillegas@Sun.COM> writes:
> >  conn.rollback();
> Doesn't the rollback block on synchronizion on the connection?
> Dag

View raw message