BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

My access database file just keeps getting bigger

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
Andy Stephenson
Guest





PostPosted: Fri May 18, 2007 8:47 pm    Post subject: My access database file just keeps getting bigger Reply with 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
Vassiliev V. V.
Guest





PostPosted: Fri May 18, 2007 9:06 pm    Post subject: Re: My access database file just keeps getting bigger Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.