Article View: borland.public.cppbuilder.database.ado
Article #4606Lock on Access file denying exclusive db open
From: Carlo Broglio
Date: Tue, 06 Nov 2001 15:36
Date: Tue, 06 Nov 2001 15:36
33 lines
2088 bytes
2088 bytes
I am using Windows 2000 Version 5.00.2195; Borland C++ Builder Version 5.0
Build 12.34 Update Pack 1; Access 2000 version 9.0.4402 SR-1 and Crystal
Reports product 8.5.0.217. I have a C++ application that needs to have
exclusive control of the Access database. When I use this function first
everything works fine (it gains exclusive access; updates the database and
returns shared access). However, if I first run a report that uses TTX
definitions and a query dataset and then try to do the exclusive update I
receive a "database locked by user admin" error and cannot obtain the
exclusive lock. I have set break points and examined the .LDL file and found
the Crystal OCX is locking the data base and not releasing the lock.
I have tried the following code in the form destroy event:
rptQuery->Active = false;
qryDates->Close();
Screen->Cursor = crArrow;
StrProc->Active = false;
rpt->CloseEngine();
dmHpms->Conn->Connected = false;
dmHpms->Conn->Mode = cmShareDenyNone;
Application->ProcessMessages();
dmHpms->Conn->Connected = true;
This does not change the lock! Has anyone encountered a post report locking
problem with Access 2000?
Technical Details
Message-ID:
<3be8038a_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!newspump.sol.net!news-xfer.siscom.net!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,bfe17601ab69c579,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-11-06 07:41:25 PST From: "Carlo Broglio" <cbroglio@polaris.umuc.edu> Newsgroups: borland.public.cppbuilder.database.ado Subject: Lock on Access file denying exclusive db open Date: Tue, 6 Nov 2001 10:36:39 -0500 Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2462.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 NNTP-Posting-Host: 169.135.18.59 Message-ID: <3be8038a_2@dnews> X-Trace: dnews 1005061002 169.135.18.59 (6 Nov 2001 07:36:42 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!newspump.sol.net!news-xfer.siscom.net!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews