Article View: borland.public.cppbuilder.database.ado
Article #5644Multi-user access to ADO database
From: Juan Jos� S�nchez
Date: Tue, 27 Mar 2001 02:50
Date: Tue, 27 Mar 2001 02:50
35 lines
2252 bytes
2252 bytes
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:
<3abfffb9_2@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!news.stealth.net!feed.textport.net!news.bnb-lp.com!dnews!193.153.108.96Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,8b2ebec8318fa91a,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-03-26 19:24:04 PST From: "Juan Jos� S�nchez" <JUANJOSE94@terra.es> Newsgroups: borland.public.cppbuilder.database.ado Subject: Multi-user access to ADO database Date: Tue, 27 Mar 2001 04:50:40 +0200 Lines: 38 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 NNTP-Posting-Host: 193.153.108.96 Message-ID: <3abfffb9_2@dnews> X-Trace: 26 Mar 2001 18:49:29 -0800, 193.153.108.96 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!news.stealth.net!feed.textport.net!news.bnb-lp.com!dnews!193.153.108.96