If you delete data or objects in the access database or delete objects in the Access Project, the Access database or Access project may produce fragments and reduce the disk space usage efficiency. Compressing the Access database or Access project is actually copying the file and reorganizing the storage mode of the file on the disk. Simultaneous compression Optimization
If you delete data or objects in the access database or delete objects in the Access Project, the Access database or Access project may produce fragments and reduce the disk space usage efficiency. Compressing the Access database or Access project is actually copying the file and reorganizing the storage mode of the file on the disk. Simultaneous compression Optimization
IfDatabaseTo delete data or objects, or to delete objects in the Access Project, AccessDatabaseOr the Access project may cause fragmentation and reduce the efficiency of disk space usage.CompressionAccessDatabaseOr the Access project is actually copying the file and reorganizing the storage of the file on the disk.CompressionThe AccessDatabaseAnd Access project performance.
So we areDatabaseWhen the asp program is too slow to bear, I thoughtCompressionHe. However, the general practice is to download it to the local device and then use MSaccess to complete the process.CompressionOperation, and then upload!
Note that this program is actually connected to the JET engine through the fso permission. Therefore, before using it, please confirm that your server supports the FSO (filesystemobject) Permission and install the latest ACCESS driver! For security reasons, goCompressionOriginal backupDatabase! Environment that has passed the test:
WIN98SE + PWS, WIN2000 + IIS5.0
The following is the compiled source code. Copy and save it as compact. asp and upload itDatabaseThe directory can be used normally.
ACCESS <strong> database </strong> <strong> compression </strong> Program
General ACCESSDatabaseOnlineCompressionProgram
This program is actually connected to the JET engine through the FSO permission,
Therefore, make sure that your server supports FSO before use.
(Filesystemobject) Permission and install the latest ACCESS driver!
For security reasons, goCompressionOriginal backupDatabase!
Running Environment: In WIN98SE + PWS, WIN2000 + IIS5.0
<%
Const JET_3X = 4
Function CompactDB (dbPath, boolIs97)
Dim fso, Engine, strDBPath
StrDBPath = left (dbPath, limit Rev (DBPath ,"\"))
Set fso = CreateObject ("Scripting. FileSystemObject ")
If fso. FileExists (dbPath) Then
Set Engine = CreateObject ("JRO. JetEngine ")
If boolIs97 = "True" Then
Engine. CompactDatabase "PRovider = Microsoft. Jet. OLEDB.4.0; Data Source =" & dbpath ,_
"Provider = Microsoft. Jet. OLEDB.4.0; Data Source =" & strDBPath & "temp. mdb ;"_
& "Jet OLEDB: Engine Type =" & JET_3X
Else
Engine. CompactDatabase "Provider = Microsoft. Jet. OLEDB.4.0; Data Source =" & dbpath ,_
"Provider = Microsoft. Jet. OLEDB.4.0; Data Source =" & strDBPath & "temp. mdb"
End If
Fso. CopyFile strDBPath & "temp. mdb", dbpath
Fso. DeleteFile (strDBPath & "temp. mdb ")
Set fso = nothing
Set Engine = nothing
CompactDB = "YourDatabase, "& Dbpath &", has beenCompression"& VbCrLf
Else
CompactDB = "your inputDatabasePath or name not found. Please try again "& vbCrLf
End If
End Function
%>
<%
Dim dbpath, boolIs97
Dbpath = request ("dbpath ")
BoolIs97 = request ("boolIs97 ")
If dbpath <> "" Then
Dbpath = server. mappath (dbpath)
Response. write (CompactDB (dbpath, boolIs97 ))
End If
%>