Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / February 2007

Tip: Looking for answers? Try searching our database.

How to delete records from database to save space?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daniel - 09 Feb 2007 21:28 GMT
Hello,

    I need to delete unused data from my database, so I can reduce the
MDB file size. How do I do it?

    This is my delete command:

delete from events where events.customerid in (select events.customerid
from events, customers, companies where events.customerid =
customers.customerid and customers.companyid = companies.companyid and
companies.inactivate = 'Y');

    After I deleted these records, but the MDB file size does not
change  on harddisk.

Thanks.
John Spencer - 09 Feb 2007 21:44 GMT
You must compact the database after you delete to recover the space.

Look under the Tools menu- probably under the Database Utilities item

Signature

John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.

> Hello,
>
[quoted text clipped - 12 lines]
>
> Thanks.
Daniel - 09 Feb 2007 21:51 GMT
> You must compact the database after you delete to recover the space.
>
> Look under the Tools menu- probably under the Database Utilities item

It worked. Thanks, John.

Btw, can I use SQL command to do it? Because I am use C++ to operate
access database.
Daniel - 09 Feb 2007 22:15 GMT
>> You must compact the database after you delete to recover the space.
>>
[quoted text clipped - 4 lines]
> Btw, can I use SQL command to do it? Because I am use C++ to operate
> access database.
Nvm, I did some search on google, I got my answer. thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.