Article View: borland.public.cppbuilder.database.ado
Article #1685Problems using DeleteRecords() with arFiltered
From: EDW
Date: Fri, 02 Apr 2004 00:02
Date: Fri, 02 Apr 2004 00:02
24 lines
1768 bytes
1768 bytes
I'd like to allow the user to delete a range of dates and figured the
best way would be to allow them to filter all records with the target
date and just call the DeleteRecords method. The table is not in read
only or batch mode but I still get errors. The table has others linked
to it but I can delete records individually just fine, I can also delete
the orphans as well. I just can't seem to get the table to do a ranged
delete.
When I make the call my application throws an EOle exception "Operation
is not allowed in this context".
TCursorOptions opt;
opt.Clear();
opt << coDelete;
if(!Table->Supports(opt))
{
ShowMessage("Delete on this record is not supported");
return(0);
}
Table1->DeleteRecords(arFiltered);
Is there somthing I'm missing?
Technical Details
Message-ID:
<406cad98@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,2626ef355d9f010d,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2004-04-01 16:10:05 PST Date: Thu, 01 Apr 2004 19:02:31 -0500 From: EDW <aegis45@hotmail.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.database.ado Subject: Problems using DeleteRecords() with arFiltered Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 68.168.131.18 Message-ID: <406cad98@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1080864152 68.168.131.18 (1 Apr 2004 16:02:32 -0800) Lines: 25 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail