Someone created a point of sale for a supermarket. Now i need to track all deletions made. We use f10 key to delete an entry.

Can someone please help me with an idea or solution?

Thanks in advance, your help will be highly appreciated.

Dani AI

Generated

reported a POS where F10 deletes must be tracked. As pointed out, the database type and whether deletes happen only via the app matter. already suggested soft-delete or moving rows to a deleted table; both are valid starting points. Below are practical, low-risk ways to implement reliable delete tracking and recovery.

A recommended, minimal audit design is an append-only audit table that stores who deleted what, when, and the full row snapshot so recovery is easy. Example schema (generic SQL):

CREATE TABLE Audit_Deletes (
  AuditID INT IDENTITY PRIMARY KEY,
  TableName VARCHAR(128),
  PrimaryKeyValues VARCHAR(4000),
  DeletedBy VARCHAR(128),
  DeletedAt DATETIME,
  RowSnapshot NVARCHAR(MAX),
  Reason VARCHAR(400)
);

Implementation tips and cautions: update the application so F10 either sets an IsDeleted flag or (preferably) performs an INSERT into Audit_Deletes and then deletes the original row inside the same transaction. Add database-level DELETE triggers to capture deletes that bypass the app. Use a view (or filtered index) to hide soft-deleted rows from normal queries if using an IsDeleted flag. Test restore procedures regularly (move back from Audit_Deletes), monitor audit-table growth, and implement retention/partitioning. Record a trusted actor id (Windows/app login or operator id) rather than client-provided text, and consider encryption for sensitive data. For environments with modern DB features, built-in change tracking/CDC or system-versioned temporal tables are alternative options to evaluate.

Recommended Answers

All 2 Replies

We will have to get some more information from you.

What database is used, what fields in the table when deleting
Is the user deleting on the system, in other words in the database?

Are you using VB6?

Hi

I agree with AndreRet, but two suggestions to think about

1) Put an extra field on database table so when f10 pressed record is maked as deleted, but is not actually deleted. You then need to make sure these records are not selected in other parts of the system.

2) Have a deleted record table, which has same fields, but when f10 pressed you moves record to thi table.

Denis

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.