Compact MDB database

Advertisements

  Top Tutorials     New Tutorials     Submit     Login     Register  

Tutorial Detail

Compact MDB database

Two ways to compact (compress) MDB database directly from the ASP/VBS using DAO 3.5 or JRO (MDAC 2.1).
http://www.motobit.com/tips/detpg_CompactMDB/
  • Total Hits: 13280

  • Average Rating :
    URL RatingURL RatingURL RatingURL RatingURL Rating

  •  

  • Total Votes: 139 votes

  • Category: ASP/Database Concepts

  • Submitted on: 2008-03-06 09:35:56

  • Submitted By: Devesh Khanna

  • Set as Favorite

Description:

You can compact MDB database directly from the ASP (VBS) by DAO or JRO :

1. DAO engine (DAO 3.5 must be installed)

Set Engine = CreateObject("DAO.DBEngine.35")
Engine.CompactDatabase "path\database.mdb", "path\compacted_database.mdb"

2. JRO (At least MDAC 2.1 must be installed)

Set Engine = CreateObject("JRO.JetEngine")
Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=path\database.mdb", _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=path\compacted_database.mdb"


Either DAO or JRO does not support compact to the same file name. You must create temporary compacted database and then copy the temporary file over original database.    More detail...

Rating Detail

 Stars  Percentage  Total Vote
 One star  Vote LeftVote MiddleVote Right 38.85%  54
 Two starsTwo star  Vote LeftVote MiddleVote Right 10.07%  14
 Three starsThree starsThree stars  Vote LeftVote MiddleVote Right 11.51%  16
 Four starsFour starsFour starsFour stars  Vote LeftVote MiddleVote Right 10.79%  15
 Five starsFive starsFive starsFive starsFive stars  Vote LeftVote MiddleVote Right 28.78%  40

Caste Your Vote

 Rating  Selection  Guidelines
 Poor:     Very disappointing, useless.
 Fair:     Below average, disappointing but not useless.
 Good:     About average in its class.
 Very Good:     Above average for its category.
 Excellent:     One of the best Tutorials in its category.





Advertisements
Advertisements