> Dear Experts
>
> What is the best way to make dbf empty In multiuser system
>
> 1-delete all
> 2-delete from table1
> 3-how to count deleted records from table1
> 4-how to wrtie select statement to select un deleted records
>
> I have set deleted on in my main prg
>
>
> Please help
I anticipation of working with a Client/Server database, deleted rows should be regarded as gone as soon as they ar deleted, definitely, absolutely, irrevocably gone, even in VFP.
If there's an overriding interest in keeping track of the goners, set a trigger on Delete that calls a stored procedure and copies the record, or parts of it, to a Log file. This procedure can also keep track of Updates and Insert, who made them, when and what the primary key of the record is/was.
CREATE TRIGGER ON Table1 FOR DELETE AS Sp_Log()
1. ZAP IN Table1
2. DELETE FROM Table1 is the SQL command for DELETE ALL IN Table1
3. SELECT COUNT(*) FROM Table INTO ARRAY Aa
? RECCOUNT('table1') - aa(1)
4 SET DELETED ON
SELECT * FROM Table
-Anders