🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

DeleteRecords()

#604
From: Andre Hayward
Date: Sun, 09 Oct 2005 15:32
32 lines
1894 bytes
Hi,

I'm trying to delete all the records in a single table with no
relations to any other table with

if (!dmWorks->ProgressRpt->IsEmpty())
{
  dmWorks->ProgressRpt->DeleteRecords(arAll);
}
but getting an error message "Operation is not allowed in this
context"

The error is the same whether you're using a TADOQuery, TADOTable or
TADODataSet

Nou helpfile says: use the Supports() function to find out whether the
datase will supports a delete but the supports function is a
conglomeration of enums and template functions and I can't figure out
how it should be coded.

In any case Supports() will not solve my problem.  I've also done the
Delete() function inside a loop for each record but all records are
for some reason not deleted and an error is not shown.

DELETE FROM PROGRESSRPT  returns an error "Command text does not
return a resultset" but in any case it works.  Maybe I should ignore
the error message and stick to SQL??

Any help will be appreciated.

Best Regards
Ander Hayward.
Technical Details
Message-ID: <gscik1lbmrhvc01v7cjnu8c4qecsk8qffi@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,af11e39129a3c888,start
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Andre Hayward <jorhaypi@mweb.co.za>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: DeleteRecords()
Date: Sun, 09 Oct 2005 17:32:22 +0200
Organization: Jordaan Hayward Inc.
Message-ID: <gscik1lbmrhvc01v7cjnu8c4qecsk8qffi@4ax.com>
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 196.23.248.8
X-Trace: newsgroups.borland.com 1128871798 196.23.248.8 (9 Oct 2005 08:29:58 -0700)
Lines: 32
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail