PDA

View Full Version : Comppress and Repair of Access DB using VB code


SemSh
04-03-03, 08:02
Hello !!!

A very annoying question I'm writing a small application using VB and ODBC conection to Assess Database (ADO) . Ineed some way for the aplication to preform Compress & Repair of my database.

Thank You!!

Sem

playernovis
04-04-03, 02:07
You can use old DAO.... use RepairDatabase or CompactDatabase methods


or you can use ADO's brother JRO....

Dim JRO As JRO.JetEngine
Set JRO = New JRO.JetEngine

JRO.CompactDatabase _
"Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=C:\md1.mdb", _
"Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=C:\md1_new.mdb"_
& ";Jet OLEDB:Engine Type=4"


http://support.microsoft.com/default.aspx?scid=kb;EN-US;q230501&GSSNB=1



jiri




Originally posted by SemSh
Hello !!!

A very annoying question I'm writing a small application using VB and ODBC conection to Assess Database (ADO) . Ineed some way for the aplication to preform Compress & Repair of my database.

Thank You!!

Sem

SemSh
04-06-03, 05:16
Thank You very much!!!