----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: Rahul Message 2 in Discussion Hello, I have found it, throught someone may need it.... first Add a reffrence to interlop.dao assembly and then... this compact / defragment the database and fix the currupt database! ' With this code we can compact the database... Dim je As New DAO.DBEngineClass ' Make sure there isn't already a file with the ' name of the compacted database. If Dir(Application.StartupPath & "\NewAdd.mdb") <> "" Then Kill(Application.StartupPath & "\NewAdd.mdb") ' Basic compact - creating new database named newnwind je.CompactDatabase(Application.StartupPath & "\Add.mdb", Application.StartupPath & "\NewAdd.mdb") ' Delete the original database Kill(Application.StartupPath & "\Add.mdb") ' Rename the file back to the original name Rename(Application.StartupPath & ".\NewAdd.mdb", Application.StartupPath & ".\Add.mdb Regards, Rahul. ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/bdotnet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
