 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Andy Stephenson Guest
|
Posted: Fri May 18, 2007 8:47 pm Post subject: My access database file just keeps getting bigger |
|
|
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 |
|
| Back to top |
|
 |
Vassiliev V. V. Guest
|
Posted: Fri May 18, 2007 9:06 pm Post subject: 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 (AT) asamicros (DOT) com> ???????/???????? ? ????????
?????????: news:464dca75$1 (AT) newsgroups (DOT) borland.com...
| Quote: | 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 |
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|