Here is an example of compacting an Access Database using JRO:
<%
Option Explicit
Const THEJETVAR= 4
function Squish(thePathDB, boolIs97)
Dim fso, Engine, strThePathDB
strThePathDB = left(thePathDB,instrrev(ThePathDB,"\"

)
Set fso = CreateObject("Scripting.FileSystemObject"
if fso.FileExists(thePathDB) Then
Set Engine = CreateObject("JRO.JetEngine"
if boolIs97 = "True" Then
Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & thePathDB, _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strThePathDB & "temp.mdb;" _
& "Jet OLEDB:Engine Type=" & JET_3X
Else
Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & thePathDB, _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strThePathDB & "temp.mdb"
End if
fso.CopyFile strThePathDB & "temp.mdb",thePathDB
fso.DeleteFile(strThePathDB & "temp.mdb"

Set fso = nothing
Set Engine = nothing
Squish = "Your database, " & thePathDB & ", has been Compacted" & vbCrLf
Else
Squish = "The database name or path has Not been found. Try Again" & vbCrLf
End if
End function
%>
<HTML><HEAD><TITLE>Compact Database</TITLE></HEAD><BODY>
<H2 align="center"> Compacting Dealer database</H2>
<P align="center">
<FORM action=compact.asp>
Enter relative path To the database, including database name.<BR><BR>
<INPUT type="text" name="thePathDB" value="/data/dealers.mdb">
<BR><BR>
<INPUT type="checkbox" name="boolIs97" value="True"> Check if Access 97 database
<BR><I> (default is Access 2000)</I><BR><BR>
<INPUT type="submit">
<FORM>
<BR><BR>
<%
Dim thePathDB,boolIs97
thePathDB = request("thePathDB"

boolIs97 = request("boolIs97"
if thePathDB <> "" Then
thePathDB = server.mappath(thePathDB)
response.write(Squish(thePathDB,boolIs97))
End if
%>
</P></BODY></HTML>
Regards,
Trope