🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Multi-user access to ADO database

#5657
From: Juan Jos� S�nchez
Date: Wed, 28 Mar 2001 17:16
32 lines
2042 bytes
Hi, Mark!

I had already a Primary Key in my database, and I've changed the code as
follows:

Client 1
...
void __fastcall TForm1::Button1Click(TObject *Sender)
{                                                                                       
    ADODataSet1->Refresh();                                            
    ADODataSet1->First();
    ADODataSet1->Edit();                                                  
    ADODataSet1->FieldValues["FIELD1"] = 1;
    ADODataSet1->Post();
}

Client 2
...
void __fastcall TForm2::Button1Click(TObject *Sender)   
{                                                                                       
    ADODataSet1->Refresh();                                            
    ADODataSet1->First();
    ADODataSet1->Edit();                                                  
    ADODataSet1->FieldValues["FIELD1"] = 2;
    ADODataSet1->Post();
}

But the same error occurs, could you tell me any safe way of doing this?

NOTE: Changing Refresh() by Close() + Open() solves the problem but it's extremely slow.

Thanks Mark for your attention!!
Technical Details
Message-ID: <3ac21c1b_1@dnews>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!193.152.151.159
References: <3abfffb9_2@dnews> <3AC158DD.C65A33B7@temporaldoorway.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,8b2ebec8318fa91a
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-03-28 09:22:07 PST
From: "Juan Jos� S�nchez" <JUANJOSE94@terra.es>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3abfffb9_2@dnews> <3AC158DD.C65A33B7@temporaldoorway.com>
Subject: Re: Multi-user access to ADO database
Date: Wed, 28 Mar 2001 19:16:16 +0200
Lines: 36
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.152.151.159
Message-ID: <3ac21c1b_1@dnews>
X-Trace: 28 Mar 2001 09:15:07 -0800, 193.152.151.159
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!193.152.151.159