Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Statement.cancel() hangs, even with May 20 release of jConnect

2 posts in JDBC Connect (product renamed to JConnect) Last posting was on 1997-05-27 18:06:30.0Z
Andy Cohen Posted on 1997-05-21 22:12:08.0Z
From: "Andy Cohen" <acohen@dnai.com>
Subject: Statement.cancel() hangs, even with May 20 release of jConnect
Organization: Cohen Software Development Services, Inc.
Message-ID: <01bc663c$1e22cf80$f3b021cf@rover.dnai.com>
X-Newsreader: Microsoft Internet News 4.70.1155
Newsgroups: sybase.public.jdbcconnect
Date: Wed, 21 May 1997 18:12:08 -0400
Lines: 17
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:792
Article PK: 252544

I was hoping to use Statement.cancel() to abort a long-running query (I'm
using WAITFOR DELAY as a reliably long-running operation). Unfortunately,
Statement.cancel() just hangs. I downloaded the latest version of jConnect
today (5/21/97) in hopes it would cure my problem, but there's no change.

Is Statement.cancel() supposed to abort long-running queries? Or is it only
intended to eat up the unwanted remainders of long result sets? If so, how
can I abort a long-running query?

Thanks for any information,

Andy

--
Andy Cohen
Cohen Software Development Services, Inc.
510-658-9519
acohen@dnai.com
http://www.dnai.com/~acohen/


David Clegg Posted on 1997-05-27 18:06:30.0Z
Message-ID: <338B22A6.69AD44F8@sybase.com>
Date: Tue, 27 May 1997 11:06:30 -0700
From: David Clegg <davec@sybase.com>
X-Mailer: Mozilla 2.01 (X11; I; Linux 1.2.13 i586)
MIME-Version: 1.0
To: Andy Cohen <acohen@dnai.com>
Subject: Re: Statement.cancel() hangs, even with May 20 release of jConnect
References: <01bc663c$1e22cf80$f3b021cf@rover.dnai.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 32
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:768
Article PK: 252520

Statement.cancel() SHOULD be able to cancel a long-running query. If
the statement is waiting in a read (executeUpdate() will loop in a
result-set loop until it reads a TDS_DONE+Final token), then a
statement.cancel() done from another thread on that statement should
send a CANCEL_ATTN to the server - which SHOULD abort the query and
respond with a ATTN_ACK.

If you execute the statement.cancel() on a DIFFERENT idle statement
on the same connection jConnect does NOT send the CANCEL_ATTN - you
have to send the cancel on the busy statement.

dave

>
> I was hoping to use Statement.cancel() to abort a long-running query (I'm
> using WAITFOR DELAY as a reliably long-running operation). Unfortunately,
> Statement.cancel() just hangs. I downloaded the latest version of jConnect
> today (5/21/97) in hopes it would cure my problem, but there's no change.
>
> Is Statement.cancel() supposed to abort long-running queries? Or is it only
> intended to eat up the unwanted remainders of long result sets? If so, how
> can I abort a long-running query?
>
> Thanks for any information,
>
> Andy
>
> --
> Andy Cohen
> Cohen Software Development Services, Inc.
> 510-658-9519
> acohen@dnai.com
> http://www.dnai.com/~acohen/