Article View: borland.public.cppbuilder.database.ado
Article #1171Re: Deleting a whole recordset
From: Michele Santucci
Date: Mon, 18 Oct 2004 08:06
Date: Mon, 18 Oct 2004 08:06
49 lines
2685 bytes
2685 bytes
Thank you! Of course this will work but since I prefer not to mix different ways of programming: there's a way to accomplish that by using TADODataSet methods? "Viatcheslav V. Vassiliev" <support@oledbdirect.com> ha scritto nel messaggio news:417155f1$1@newsgroups.borland.com... > If you need to delete all records in table, it is usually more effective to > execute DELETE FROM TableName SQL command, for MS Access - DELETE * FROM > TableName, for MS SQL Server TRUNCATE TableName. > > //------------------------------------------ > Regards, > Vassiliev V. V. > http://www.managed-vcl.com - using .Net objects in Delphi for Win32 + > ADO.Net > http://www.oledbdirect.com - The fastest way to access MS SQL Server, > MS Jet (Access) and Interbase (through OLEDB) > > "Michele Santucci" <michele.santucci@celinavio.it> �������/�������� � > �������� ���������: news:41711cac@newsgroups.borland.com... > > I have a form showing up a table content by data-aware components > connected > > to a dataset I have to empty the underlying table and so I tought tou use > > DeleteRecords method.. but If I try I got an exception of this kind: > > > > Project Environment.exe raised exception class EDatabaseError with message > > 'Operation not permitted in the current context'. Process stopped. Use > Step > > or Run to continue. > > > > The 'faulty' code is that: > > > > dmEnvironmentData->adodsEnvironment->DisableControls(); > > dmEnvironmentData->adodsEnvironment->DeleteRecords(); > > dmEnvironmentData->adodsEnvironment->EnableControls(); > > > > > > -- > > > > bye by(t)e[z]....TuX! > > > > > >
Technical Details
Message-ID:
<417379d1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41711cac@newsgroups.borland.com> <417155f1$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,92d5af6035d603fd X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII From: "Michele Santucci" <michele.santucci.nospam@nospam.celinavio.it> Newsgroups: borland.public.cppbuilder.database.ado References: <41711cac@newsgroups.borland.com> <417155f1$1@newsgroups.borland.com> Subject: Re: Deleting a whole recordset Date: Mon, 18 Oct 2004 10:06:44 +0200 Lines: 51 Organization: Celin Avio S.r.l. X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 62.94.122.129 Message-ID: <417379d1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1098086865 62.94.122.129 (18 Oct 2004 01:07:45 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail