Unless you have 5 or LESS users (at least with the old versions) They would corrupt DB files with 6 or 7 concurrent requests. Everything went down, until the DB was rebuilt.
This is from the old days, when we used it. We'd rebuild BEFORE each run.
Private Sub Form_Load()
' Set Reference to Microsoft Jet Runtim Object (JRO)
' BROWSE if not found: \program files\common files\system\ado\msjro.dll
Dim jro As jro.JetEngine, xn$
Set jro = New jro.JetEngine
Screen.MousePointer = vbHourglass
xn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\"
jro.CompactDatabase xn & db, xn & db & "-2"
If Len(Dir(App.Path & "\" & db & "-2")) > 0 Then
Kill App.Path & "\" & db
Do While Len(Dir(App.Path & "\" & db)) > 0
DoEvents ' wait for delete
Name App.Path & "\" & db & "-2" As App.Path & "\" & db
Do While Len(Dir(App.Path & "\" & db)) = 0
DoEvents ' wait for copy to complete
Screen.MousePointer = vbDefault
Last edited by dglienna; December 21st, 2011 at 06:18 PM.