presto fatto! eccolo:
<table border="0" width="100%">
<tr>
<td width="33%" align="left" nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
[img]<%= strImageUrl %>images/icon_folder_open.gif[/img]<a href="default.asp">Tutti
i Forum</a>
[img]<%= strImageUrl %>images/icon_bar.gif[/img][img]<%= strImageUrl %>images/icon_folder_open.gif[/img]<a href="admin_forums.asp">Cancellazione
del Forum/Archiviazione</a>
[img]<%= strImageUrl %>images/icon_blank.gif[/img][img]<%= strImageUrl %>images/icon_bar.gif[/img][img]<%= strImageUrl %>images/icon_folder_open_topic.gif[/img]Compattazzione
Database
</font></td>
</tr>
</table>
<%
strTempFile = Server.MapPath("/mdb-database/Snitz_compacted.mdb")
strForumDB = getForumDB()
strForumDB = replace(strForumDB,";","",1,1)
%>
<table border="0" width="70%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td bgcolor="<% =strTableBorderColor %>">
<table border="0" width="100%" cellspacing="1" cellpadding="4">
<tr>
<td bgcolor="<%= strCategoryCellColor %>" colspan=2><font face="<%= strDefaultFontFace %>" size="<%= strDefaultFontSize %>" color="<%= strCategoryFontColor %>">
Funzioni dell'archivio del Forum amministrativo- Compact DB
</font></td>
</tr>
<tr>
<td bgcolor="<%= strForumCellColor %>" valign=top><font face="<%= strDefaultFontFace %>" size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>">
<% If request("action") <> "Yes" then %>
<div align="center">Dipendendo dalla sicurezza del sistema di reset
presso il tuo Host,queste operazioni possono avere successo oppure
no , comunque nessun danno doverebbbero creare al DataBase.</div>
Il tuo Databse originale sarà copiato a<%= left(strForumDB,len(strForumDB)-5) & DateToStr(strForumTimeadjust) & ".bak" %>
come beckap e quindi compattato a<%= strTempFile %>
Se questi passaggi sono hanno successo il tuo DB originario sarà
sostituito dal database compattato..
Questo potrebbe richiedere del tempo dipendendo dalla dimensione del
tuo Database..
<font color="Red">
<div align="center">Tu avrai da chiudere il Database mentre il sistema
di compattazione stà girando.</font>
Premi qui per
chiudere il Forum prima di iniziare.</div>
<% If Application("down") then %>
<div align="center">Sei sicuro di voler compattare il Database?
SiNo</div>
<%
End If
else
my_conn.close
strTempConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("tools/Snitz_compacted.mdb")
if BackupDB(strForumDB) then
set jro = server.createobject("jro.JetEngine")
jro.CompactDatabase strConnString, strTempConnString
if err <> 0 then
bError = True
response.write "Error Compacting:
" & err.description
else
response.write "
<div align=""center"">Compattazzione Database Riuscita!.</div>"
end if
if not bError then
if not RenameFile( strTempFile, strForumDB) then
response.write "Errore Rimpiazzato:
" & err.description
else
response.write "
<div align=""center"">Database Rinominato con successo.</div>
"
end if
end if
else
response.write "
<div align=""center"">Inpossibile tornare al Database</div>
"
end if
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
End If
End if
%>
</font></td>
</tr>
</table>
</td>
</tr>
</table>
<% If Application("down") then %>
<div align="center"><a href="down.asp?target=admin_forums.asp"><font face="<%= strDefaultFontFace %>" size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>">Apri
Forum</font></a></div>
<% End If %>
<%
Function RenameFile(sFrom, sTo)
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
if err.number <> 0 then
RenameFile = False
Exit Function
end if
fso.DeleteFile sTo,true
fso.MoveFile sFrom, sTo
set fso = nothing
RenameFile = True
End Function
Function BackupDB(sFrom)
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
if err.number <> 0 then
BackupDB = False
Exit Function
end if
fso.CopyFile sFrom, fso.GetParentFolderName(sFrom) & "\" & fso.GetBaseName(sFrom) & DateTostr(strForumTimeAdjust) & ".bak", true
set fso = nothing
BackupDB = True
End Function
function GetForumDB()
dim tmpFileName
tmpFileName = split(strConnstring,"Source=",2,1)
GetForumDB = tmpFileName(1)
End function
%>