Re: My access database file just keeps getting bigger



You can compact MS Access database - import "Microsoft Jet and Replication
Objects 2.X Library".

var
engine: IJetEngine;
src, dst: WideString;
begin
src := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + 'C:\SrcDB.mdb';
dst := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + C:\compacted.mdb';

engine := CoJetEngine.Create();
engine.CompactDatabase(src, dst);
end;

This will also repair database. You always compact into another database.
All users should be disconnected. After this you could copy compacted.mdb in
place of srcdb.mdb.

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)


"Andy Stephenson" <info2004@xxxxxxxxxxxxx> ???????/???????? ? ????????
?????????: news:464dca75$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

I'm using an access file to form a queue between my app and an sql
database. If I can't connect, I send the data to the access database.
Later, when I can connect, I send the data to the sql server, and delete
it from the access database.

However, the access database file just keeps on getting bigger. If I use
access to have a look at it, it contains no data. I am guessing that when
I delete the data, it is being retained.

Is this really the case, and if so, how do I really get rid of it?

Thanks,

Andy


.



Relevant Pages

  • RE: Criteria for importing tables from a odbc link
    ... Importing the data from the linked tables is a bad idea for several reasons. ... You did not say what the back end database engine is. ... If it is an Access database, it would be faster to do a direct ... month in order to run a report. ...
    (microsoft.public.access.externaldata)
  • Re: Authentication Error VB6 WinXP
    ... Consider that a heavily pressed JET DB engine does not write right away. ... My project runs on a PC and uses an Access database on the same PC. ... There is a datagrid connected to the database via an ADODC data control. ... First I thought I might have a race condition between the two code segments so I tried setting up a timer to later execute the ADODC1 code. ...
    (microsoft.public.vb.database.ado)
  • Re: import system tables (e.g. MSysAccessStorage)
    ... Access maintains them for itself (the Access database ... engine is "the other user" it's complaining about); ... BACK IT UP and delete the "1" suffix ... John W. Vinson ...
    (microsoft.public.access.tablesdbdesign)
  • ADO update fails in C++.NET
    ... My application uses an ADO record set, employing the Microsoft Jet 4.0 to ... interface with an Access database. ...
    (microsoft.public.data.ado)
  • Connecting To An Access Database
    ... When I set up a Data Link to an Access database, I have a problem if the ... I can connect if I use Microsoft OLE DB provider for ODBC Drivers but can ... not when I use the Microsoft Jet 4.0 OLE DB provider. ...
    (microsoft.public.vb.database.ado)