🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Using ADO to bypass concurrency checks in a TADOQuery

#141
From: PaulR
Date: Mon, 09 Apr 2007 22:57
23 lines
1658 bytes
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: <461ac4e3$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,c660d6ef8236021d,start
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Mon, 09 Apr 2007 17:57:51 -0500
From: PaulR <nospam_prodden@jwscorp.com_nospam>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Using ADO to bypass concurrency checks in a TADOQuery
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 66.141.242.129
Message-ID: <461ac4e3$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1176159459 66.141.242.129 (9 Apr 2007 15:57:39 -0800)
Lines: 24
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail