John

Have a look at the TupdateSql component, which can be used by a Tquery via
its UpdateObject property. It is ideally suited to post updates for
read-only datasets (i.e. where querying more than one table as in your
case).

HTH
Martin

 -----Original Message-----
From:   John Christenhusz [mailto:[EMAIL PROTECTED]] 
Sent:   Tuesday, February 20, 2001 12:46
To:     Multiple recipients of list delphi
Subject:        [DUG]:  Deleting records

G'day folks,

I want to delete certain records from multiple linked tables.
The criteria (defined in sFILTER) is e.g. "ClientType = 2"

What I did is, I created the following SQL and delete records in a loop.
The thing is, that the loop seems to work quite well, it counts down
(indicated by the recordCount value, but:
- it deletes not all the records with the specified criteria, and
- it also deletes a few records outside of the specified criteria,
- sometimes it runs through the loop and after all it did not delete any
records at all, but while running in the loop they seem to disappear
otherwise it wouldn't come out of the loop.


"WS SMTP relay" made the following
 annotations on 02/21/01 11:44:47
------------------------------------------------------------------------------

[INFO] -- Content Manager:
[MMSSOV] This e-mail message and any attachments are confidential to Sovereign Limited 
and subsidiaries and subject to legal privilege. If you have received this e-mail in 
error, please advise the sender immediately and destroy the message and any 
attachments.  If you are not the intended recipient you are notified that any use, 
distribution, amendment, copying or any action taken or omitted to be taken in 
reliance of this message or attachments is prohibited.

==============================================================================

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to