Subject | Re: [ib-support] Delphi Delete Records |
---|---|
Author | Slim Roberts |
Post date | 2002-11-06T07:26:10Z |
Alan.
Use a TIBSQL component Do (Delete from TableName where Value =:pValue)
Params[0].AsWhatever := Value for deletion;
ExecSQL;
Around this you must put a transaction.
As to how to do the lot.
Create a TStringList
Add the Primary Key value to the list for each record to zap
the do a for x = 0 to list count
and run above SQL for each, and put the transaction around the lot
HTH
Slim
Slim Roberts
R S Engineering.
UK
www.rs-engineering.co.uk
Member of the UK Borland User Group
Use a TIBSQL component Do (Delete from TableName where Value =:pValue)
Params[0].AsWhatever := Value for deletion;
ExecSQL;
Around this you must put a transaction.
As to how to do the lot.
Create a TStringList
Add the Primary Key value to the list for each record to zap
the do a for x = 0 to list count
and run above SQL for each, and put the transaction around the lot
HTH
Slim
Slim Roberts
R S Engineering.
UK
www.rs-engineering.co.uk
Member of the UK Borland User Group