FREE tutorial,solution,RSS Feeds on Operating Systems, Programming, Web Development, Applications, Databases, Networking, Hardware, Security, SEO Free Expertsforge Membership
Join us as Moderator
Submit Article to Expertsforge.com Submit Article My Expertsforge
 
RSS Feeds, Help Help RSS Feeds
bannertop
 

ASP Tutorial: Compact MS Access Database using ASP

jawahar
11/25/2007 5:49:40 AM, Views: 1594
The following code can be used to compact MS Access(MDB) database using ASP code. Compacting the database is requuired to reduce the growing MDB file size. This can be achieved by using DAO or JRO:

Using DAO:
Requirements: DAO engine (DAO 3.5 must be installed)
Set Engine = CreateObject("DAO.DBEngine.35")
Engine.CompactDatabase "dbpath\database.mdb", "dbpath\compact_database.mdb"


Using JRO:
Requirements: 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"


Using DAO or JRO you can only create a new copy of the compacted database and then copy the new db file/rename it to the new one. Compacting the MDB directly is not possible.
Next Steps:
Add this Tutorial to:
Blink Blink del.icio.ous Del.icio.us Digg Digg
Fark Fark Furl Furl Google Google
Reddit Reddit Simpy Simpy Spurl Spurl
Technorati Technorati Windows Live Win Live Yahoo Yahoo
Rate Me!
Avg Visitor Rating: Average Visitor Rating is 4.5 out of 5
Number of Ratings : 2 Votes
Rate:
Send Private MessageSend Message
Signup / Login To View the Solution or Provide Comments
Post Comment/Solution
Comment:*
        (Link Rules) 
  Use : [bold] for <b>; [/bold] for </b>; [italic] for <i>; [/italic] for </i>; [code] & [/code] for code
 
Categories
Options
ASP RSS Feed
Most Popular Tutorial
Most Popular Solution
Top Rated
Top Rankers
Overall
1. jawahar (3000)
Yearly -2008
1. jawahar (200)
Expertsforge Sponsors
bnrtop