🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Deleting a whole recordset

#1169
From: Viatcheslav V. Vassiliev
Date: Sat, 16 Oct 2004 17:10
36 lines
2269 bytes
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: <417155f1$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41711cac@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: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <41711cac@newsgroups.borland.com>
Subject: Re: Deleting a whole recordset
Date: Sat, 16 Oct 2004 21:10:09 +0400
Lines: 38
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: 213.234.218.42
Message-ID: <417155f1$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1097946609 213.234.218.42 (16 Oct 2004 10:10:09 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail