Article View: borland.public.cppbuilder.database.ado
Article #1803Properly deleting a record using ado
From: ryan
Date: Fri, 30 Jan 2004 20:44
Date: Fri, 30 Jan 2004 20:44
25 lines
2190 bytes
2190 bytes
i cant seem to perform a query & tell my clientdataset what to delete,
then update the actual adodataset, like it's supposed to. i have
problems, and to work around this i 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 out the correct method. Please help...
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.0401301244.631c7b1@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,e7659e5968546025,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2004-01-30 12:44:30 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: Properly deleting a record using ado Date: 30 Jan 2004 12:44:30 -0800 Organization: http://groups.google.com Lines: 25 Message-ID: <2fa56e32.0401301244.631c7b1@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 1075495470 31912 127.0.0.1 (30 Jan 2004 20:44:30 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 30 Jan 2004 20:44:30 +0000 (UTC)