🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Locking with ADO and Oracle

#5023
From: Arnie Mauer
Date: Thu, 23 Aug 2001 12:19
32 lines
2132 bytes
You can explicitly lock records in Oracle by adding:
"FOR UPDATE NOWAIT"
to the end of the SELECT statement.  This will throw an
Exception if the selected record is locked and you can decode
the ORA error code from there.

- Arnie

"F. Schmitt" <fs@sonik.de> wrote in message news:3b84e222_2@dnews...
> Hi there,
>
> I use Microsoft OLE DB Provider for Oracle with AdoExpress,
> and want to get the user a message like "record is being edited by another
> user", best case
> when (before) the user tries to edit a record.
> I now tried nearly all possibilities on LockType, (Conenction)Mode,
> CursorType, ...
> the only error I get is "record to be updated couldn't be found" due to
the
> other user modified some fields. But I get this error only when posting my
> changes.
> I also tried all those settings with the Oracle OLE DB driver, but without
> change.
>
> Can anyone tell how to use Pessimistic Locking? Most settings I change to
> the ADOConnection or my ADOQuery are set back to default or other unusable
> values.
>
> Thanks,
>
> F. Schmitt
>
Technical Details
Message-ID: <3b84f4f4_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!194.42.224.136!diablo.netcom.net.uk!netcom.net.uk!btnet-peer!btnet!newsfeed.bt.es!195.5.65.34.MISMATCH!caladan.arrakis.es!dnews
References: <3b84e222_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5cad,4444b1be23016cad
X-Google-Attributes: gidf5cad,public
X-Google-Thread: 10698b,4444b1be23016cad
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-08-23 05:22:09 PST
From: "Arnie Mauer" <arnie@vrms.com>
Newsgroups: borland.public.cppbuilder.database.ado,borland.public.delphi.database.ado
References: <3b84e222_2@dnews>
Subject: Re: Locking with ADO and Oracle
Date: Thu, 23 Aug 2001 08:19:59 -0400
Lines: 34
Organization: VRMS
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 209.140.211.97
Message-ID: <3b84f4f4_1@dnews>
X-Trace: dnews 998569204 209.140.211.97 (23 Aug 2001 05:20:04 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!194.42.224.136!diablo.netcom.net.uk!netcom.net.uk!btnet-peer!btnet!newsfeed.bt.es!195.5.65.34.MISMATCH!caladan.arrakis.es!dnews