Article View: borland.public.cppbuilder.database.ado
Article #1693Re: Problems using DeleteRecords() with arFiltered
From: Mark Guerrieri
Date: Wed, 07 Apr 2004 21:32
Date: Wed, 07 Apr 2004 21:32
33 lines
2193 bytes
2193 bytes
arFiltered maps to the ADO enum of adAffectGroup, which requires the ADO
Filter property to be a FilterGroupEnum value or an array of bookmarks. See
the FilterGroup property for more info...
Mark
"EDW" <aegis45@hotmail.com> wrote in message
news:406cad98@newsgroups.borland.com...
> 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:
<4074737f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<406cad98@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,2626ef355d9f010d X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2004-04-07 14:40:20 PST Reply-To: "Mark Guerrieri" <mguerrieri@cmsgrp.com> From: "Mark Guerrieri" <mguerrieri@cmsgrp.com> Newsgroups: borland.public.cppbuilder.database.ado References: <406cad98@newsgroups.borland.com> Subject: Re: Problems using DeleteRecords() with arFiltered Date: Wed, 7 Apr 2004 17:32:52 -0400 Lines: 35 Organization: Creative Marketing Strategies X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 66.200.143.50 Message-ID: <4074737f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1081373567 66.200.143.50 (7 Apr 2004 14:32:47 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail