Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to PURGE / CLEAN database ??? 1

Status
Not open for further replies.

marco02

Programmer
Feb 19, 2002
35
0
0
US
Hi,

For my application I am linking a lot of tables to my database (from other dbs).

After a while of importing/deleting/importing/etc those tables, my database is enormous (+60MB) even though I barely store any data in my database.

- Why is the size of my database increasing that
much if I don't store data in it and if I delete
all the linked tables ?

- Can I "clean" my database ? How ?
- Do I have to purge the links or whatever is left after I
deleted the linked table ? How ?

Thanks alot for your help !

Marco.
 
If you're using Access, then you can Compact and Repair Database. That can be done from Access, and/or programmtically with DAO, or JRO, depending on which model you're using. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
trust me my db is over 210mb, you need to compact and repair if you're using access. ----------------
Joe
 
Just adding to what has been stated if you add a refernce to Microsoft Jet and Replication Objects x.x Library you can use code like this

Private Sub cmdCompact_Click()
Dim j As jro.JetEngine
Set j = New jro.JetEngine
j.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = c:\\myDatabase.mdb", _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\myDatabase2.mdb;Jet OLEDB:Engine Type=4"
End Sub

If you are usind ADO 2.1 or later.

You can also look up the JetComp.exe on Microsoft's website and run that instead. If you choose to battle wits with the witless be prepared to lose.
[machinegun][hammer]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top