Article View: borland.public.cppbuilder.database.ado
Article #1911problem with properly deleting a record using ado
From: ryan
Date: Fri, 16 Jan 2004 16:27
Date: Fri, 16 Jan 2004 16:27
24 lines
2051 bytes
2051 bytes
i cant seem to perform a query & tell my clientdataset what to delete,
then update the actual adodataset. i have problems, so i have to
activate my clientdataset after the query for my adodataset (so the
right query is stored) then tell it what to delete & update, then
close my clientdataset again. this is a pain & i'd like to know the
correct way. this method currently requires i have my forms point to
my ado dataset instead of my client datasets..i know this is wrong,
but cant figure it out.
DataModule3->ClientDataSet4->Active = true;
DataModule3->ClientDataSet4->Edit();
if(DataModule3->ClientDataSet4->State == dsEdit)
{
DataModule3->ClientDataSet4->Delete();
DataModule3->ClientDataSet4->ApplyUpdates(-1);
Application->MessageBox("Record
deleted.","Status", MB_OK);
DataModule3->ADOCommand1->CommandText =
"SELECT LoginName, UserRightsLevel FROM AUTHTABLE";
DataModule3->ADODataSet2->Recordset =
DataModule3->ADOCommand1->Execute();
};
DataModule3->ClientDataSet4->Active = false;
Technical Details
Message-ID:
<2fa56e32.0401160827.647e1449@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,79a4321d4a9d96e2,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2004-01-16 08:27:28 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail From: thedeak@ntslink.net (ryan) Newsgroups: borland.public.cppbuilder.database.ado Subject: problem with properly deleting a record using ado Date: 16 Jan 2004 08:27:28 -0800 Organization: http://groups.google.com Lines: 24 Message-ID: <2fa56e32.0401160827.647e1449@posting.google.com> NNTP-Posting-Host: 199.190.202.101 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1074270448 23092 127.0.0.1 (16 Jan 2004 16:27:28 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 16 Jan 2004 16:27:28 +0000 (UTC)