🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #3474

Cancelling *synchronous* query?

#3474
From: Mike Ruskai
Date: Sat, 03 Aug 2002 04:16
31 lines
2106 bytes
I'm writing an application that searches a table in an Access database where
the result set can conceivably be the entire table (which ranges from 30,000
to 250,000 records).  All searches are read-only.

I tried using asynchronous fetching with a client cursor, but the performance
is pretty bad, and memory usage quite high - as one would expect with having
to create a copy of many thousands of records (each of which is about 600
bytes in size).

When I switched to a "server" cursor, the fetches increased in speed by at
least an order of magnitude.

However, for large searches, this could still mean a long wait for users who
have relatively slow processors.

So, I'd like to let the user kill a search that's taking too long.

Opening the query on a separate thread and killing it is easy enough, but
what are the repercussions?

Will there be memory leaks?  

Better yet, is there a more graceful way to terminate a long query that has
to run synchronously (since MS was thoughtful enough to make asynchronous
fetches impossible with a server cursor)?


--
 - Mike

Remove 'spambegone.net' and reverse to send e-mail.
Technical Details
Message-ID: <gunaalargpneevrepbz.h092j50.pminews@207.105.83.65>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,490d91ba18044517,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-08-02 21:36:34 PST
Newsgroups: borland.public.cppbuilder.database.ado
From: "Mike Ruskai" <spammoc.reirracten@begoneynnaht.net>
Message-ID: <gunaalargpneevrepbz.h092j50.pminews@207.105.83.65>
Date: Sat, 03 Aug 2002 00:16:17 -0400 (EDT)
Reply-To: "Mike Ruskai" <spammoc.reirracten@begoneynnaht.net>
X-Newsreader: PMINews 2.00.1205 For OS/2
Organization: TLF
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: Cancelling *synchronous* query?
NNTP-Posting-Host: 207.207.231.198
X-Trace: dnews 1028348163 207.207.231.198 (2 Aug 2002 21:16:03 -0700)
Lines: 33
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!not-for-mail