🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Multi-user access to ADO database

#5575
From: Mark Guerrieri
Date: Fri, 30 Mar 2001 16:00
53 lines
2566 bytes
What I do is use a seperste TADOCommand object with an UPDATE statement to
write.  You still need to Requery/Refresh/Reopen your dataset to see the
changes, but you can write whatever you want whenever you want.  The problem
has to do with ADO/Jet using the entire record for updates.  This could also
happen if you changed a fields in the Primary Key.

Mark



"Juan Jos� S�nchez" <JUANJOSE94@terra.es> wrote in message
news:3abfffb9_2@dnews...
> Hi all!
>
> I've tried to write two clients that access the same database (MS Access
> 2000) via OLEDB driver for Microsoft Jet 4.0, the problem is that the
> EOLEException ( ' The especified row could not be located for
updating.Some
> values may hace been changed since it was last read ' ) occured when each
> application tried to write different data in the same record NOT
> SIMULTANEOUSLY.
> Here are the main code of both clients:
>
> Client 1
> ...
> void __fastcall TForm1::Button1Click(TObject *Sender)
> {
>     ADODataSet1->Refresh();
>     ADODataSet1->Edit();
>     ADODataSet1->FieldValues["FIELD1"] = 1;
>     ADODataSet1->Post();
> }
>
> Client 2
> ...
> void __fastcall TForm2::Button1Click(TObject *Sender)
> {
>     ADODataSet1->Refresh();
>     ADODataSet1->Edit();
>     ADODataSet1->FieldValues["FIELD1"] = 2;
>     ADODataSet1->Post();
> }
>
> How can any clients write data to the same database correctly? Should I
consider some settings to my ADOConnection that I have ignored?
>
> Note: When only one client writes to the database and the other reads
there wasn't any problem.
>
> Thanks all
>
>
>
Technical Details
Message-ID: <3ac4ad53_2@dnews>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!feeds.vnews.net!news-feeder.wcg.net!news-feeder2.wcg.net!WCG!arclight.uoregon.edu!logbridge.uoregon.edu!news.maxwell.syr.edu!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!64.67.69.146
References: <3abfffb9_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,8b2ebec8318fa91a
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-03-30 08:50:04 PST
From: "Mark Guerrieri" <mguerrieri@cmsgrp.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3abfffb9_2@dnews>
Subject: Re: Multi-user access to ADO database
Date: Fri, 30 Mar 2001 11:00:48 -0500
Lines: 55
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: 64.67.69.146
Message-ID: <3ac4ad53_2@dnews>
X-Trace: 30 Mar 2001 07:59:15 -0800, 64.67.69.146
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!feeds.vnews.net!news-feeder.wcg.net!news-feeder2.wcg.net!WCG!arclight.uoregon.edu!logbridge.uoregon.edu!news.maxwell.syr.edu!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!64.67.69.146