I haven't tried this, but I wonder if it would be possible to create an object of AuditDelete and a mapping with the audit date as the key field.
Then create the Audit Delete object and populate the id field with the audit date that you want to delete. Then delete this object.
The SQL generate should be:
DELETE FROM AuditTable WHERE AuditDate = @date
This will delete all the audit records from that date. You will still need to send a statement for each date, but it should be faster than one for each audit record.
BOb
|