Hi,
Compact and repait the database. Add a reference to the microsoft
jet and replication objects in the com tab.
Dim jro As New JRO.JetEngine
Dim fl As File
Dim strSource As String
Dim strConn As String
Dim strDest As String
Dim strDay As String
Dim drDest As Directory
strConn = "Provider = Microsoft.Jet.OLEDB.4.0;"
strConn += "Data Source = "
strSource = Application.StartupPath
strDest = strSource
strSource += "\test.mdb"
strDest += "\test.bak"
If fl.Exists(strDest) Then
fl.Delete(strDest)
End If
Try
jro.CompactDatabase(strConn + strSource, strConn + strDest)
fl.Copy(strDest, strSource, True)
Catch
fl.Copy(strSource, strDest, True)
Finally
fl.Copy(strDest, strSource, True)
jro = Nothing
End Try
Ken
--------------------------------
I am using access database for my application, whenever I insert records the
size of the data base increases, But when I delete the records the database
size does not decrease. What is the problem???
ThanX
Nitin