🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Using ADO to bypass concurrency checks in a TADOQuery

#142
From: Vassiliev V. V.
Date: Tue, 10 Apr 2007 14:24
39 lines
2466 bytes
Try to set Recordset.Properties['Update Criteria'].Value to adCriteriaKey 
( = 0). After that it should locate row by key, not by all columns - be sure 
that you have PK.

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)


"PaulR" <nospam_prodden@jwscorp.com_nospam> ???????/???????? ? ???????? 
?????????: news:461ac4e3$1@newsgroups.borland.com...
> Using BDS2006, TADOQuery, MSSQL 2005 Express, MS SQLOLEDB.1 driver
>
> I'm trying to see if I can make a TADOQuery to not get a concurrency error 
> when I:
>
> 1) Select single row in App A
> 2) App B updates same row
> 3) App A then updates same row via TADOQuery::Edit() and ::Post() methods, 
> but gets concurrency error (specifically "Row cannot be located for 
> updating. Some values may have been changed since it was last read")
>
> Ignoring the general issue of should I be doing this or not, does anyone 
> know of a way to make App A still be able to overwrite the changes posted 
> by App B without making App A reestablish position (i.e., issue another 
> select statement)?
>
> I've been playing around with the connection's IsolationLevel, the query's 
> CursorType and LockType, but no luck.
>
> Any suggestions?
>
> Thanks,
> Paul Rodden
> 
Technical Details
Message-ID: <461b9ea0$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <461ac4e3$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,c660d6ef8236021d
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Vassiliev V. V." <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <461ac4e3$1@newsgroups.borland.com>
Subject: Re: Using ADO to bypass concurrency checks in a TADOQuery
Date: Tue, 10 Apr 2007 18:24:48 +0400
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Response
X-Antivirus: avast! (VPS 000731-1, 08.04.2007), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 85.93.138.132
Message-ID: <461b9ea0$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1176215200 85.93.138.132 (10 Apr 2007 07:26:40 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail