>I know ZAP command in VFP ( to clear all records ) .. but I don't know in VB .. anybody can inform me ?
This command does not depend on the language. It depends of the database you use.
For exemple, major engines (SQL Server, Sybase, Oracle, ...) automatically purge deleted records. When you delete a record, it's gone!!!
If you use Access (and some other database), you have to "compact" your database because there is no way of doing it automatically.
I know that when you have dBase file, you have to send a Zap command. I never have to use it in VB. Which model do you use (DAO, RDO, ADO)? Maybe you can try DBEngine.CompactDatabase command (DAO model).
Tell us if it works or not.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com