Board index » delphi » Compact Database for MS Access in Delphi 5.0
Wilson He
![]() Delphi Developer |
Sat, 01 Nov 2003 10:31:31 GMT
|
Wilson He
![]() Delphi Developer |
Sat, 01 Nov 2003 10:31:31 GMT
Compact Database for MS Access in Delphi 5.0
Hi All,
Anyone knows how to call the Compact Database function in Delphi 5.0 in Best regards, |
Brian Bushay Team
![]() Delphi Developer |
Sat, 01 Nov 2003 11:25:25 GMT
Re:Compact Database for MS Access in Delphi 5.0Quote> Anyone knows how to call the Compact Database function in Delphi 5.0 in Here's a procedure that works for me. You have to import the JRO type procedure TMainForm.CompactDataBa{*word*224}uClick(Sender: TObject); |
Wilson He
![]() Delphi Developer |
Sat, 01 Nov 2003 15:21:59 GMT
Re:Compact Database for MS Access in Delphi 5.0Brian, I wonder how are you going to get the Microsoft Access's version number? Regards, "Brian Bushay TeamB" <BBus...@Nmpls.com> wrote in message Quote
|
Davi
![]() Delphi Developer |
Sun, 02 Nov 2003 02:38:15 GMT
Re:Compact Database for MS Access in Delphi 5.0Hi, I've tried the procedure, as outlined, but it seems to be not reopening the ADOConnection as in the snip:- Quote> finally "Brian Bushay TeamB" <BBus...@Nmpls.com> wrote in message |
Wilson He
![]() Delphi Developer |
Sun, 02 Nov 2003 09:23:56 GMT
Re:Compact Database for MS Access in Delphi 5.0David, I have not tried to run this procedure, cause I am still waiting for Regards, Quote"David" <p...@citydrive.co.uk> wrote in message news:3b0177fc$1_2@dnews... |
Brian Bushay Team
![]() Delphi Developer |
Sun, 02 Nov 2003 11:32:28 GMT
Re:Compact Database for MS Access in Delphi 5.0Quote>I've tried the procedure, as outlined, but it seems to be not have to present a password after compact if it is not in your connection string. -- |
Brian Bushay Team
![]() Delphi Developer |
Sun, 02 Nov 2003 11:32:27 GMT
Re:Compact Database for MS Access in Delphi 5.0Quote> I wonder how are you going to get the Microsoft Access's version number? -- |
Davi
![]() Delphi Developer |
Sun, 02 Nov 2003 17:17:30 GMT
Re:Compact Database for MS Access in Delphi 5.0Hi, LoginPrompt set to false David "Brian Bushay TeamB" <BBus...@Nmpls.com> wrote in message Quote
|
Brian Bushay Team
![]() Delphi Developer |
Mon, 03 Nov 2003 08:55:04 GMT
Re:Compact Database for MS Access in Delphi 5.0Quote>LoginPrompt set to false -- |
Davi
![]() Delphi Developer |
Mon, 03 Nov 2003 20:16:27 GMT
Re:Compact Database for MS Access in Delphi 5.0I'm obviously missing something fundemental here - brain in neutral - When I run the compiled app the db is indeed compressed, however I can then only access some forms others produce an EoleException 'operation not allowed when object closed' I also get this when I try to exit app. I assumed my ADOConnection connected prop := false but this being the case why are some ADOds avilable and some not? "Brian Bushay TeamB" <BBus...@Nmpls.com> wrote in message news:sn76gt89ompsdq17alq4gvb0nhd7or5vsk@4ax.com... Quote
|
Brian Bushay Team
![]() Delphi Developer |
Tue, 04 Nov 2003 09:47:29 GMT
Re:Compact Database for MS Access in Delphi 5.0Quote>I assumed my ADOConnection connected prop := false but this being the it. Maybe you are not reopening all the datasets you try to use after you reopen the Tadoconnection. -- |
Davi
![]() Delphi Developer |
Wed, 05 Nov 2003 21:20:35 GMT
Re:Compact Database for MS Access in Delphi 5.0Hi, I've checked following; ADOConnection.open ADOConnection.active DMDs.active All to no avail still get 'Operation is not allowed when the object is closed' I have realised however that the only Form.Ds I can access was created by showmodal method; whilst the Forms.ds that give the error were created by create(self) method I cannot think what the relavence is ? David Quote> None of the components connected to your TadoConnection are open |
Brian Bushay Team
![]() Delphi Developer |
Fri, 07 Nov 2003 10:41:48 GMT
Re:Compact Database for MS Access in Delphi 5.0Quote>I have realised however that the only Form.Ds I can access was created recreating them? -- |
Davi
![]() Delphi Developer |
Fri, 07 Nov 2003 22:11:39 GMT
Re:Compact Database for MS Access in Delphi 5.0Hi, The main form is an SDI,fsnormal it only has the various menu's on it.The Ds.forms are created on Menu.option.click and freed on closing.The only Form open,or in memory, when I compress is the Main form and a couple of dialoge forms(About eg). I'm not sure therefore how else to impliment yr suggestion David Quote> Have you tried explicitly closing all your forms before the compact |
Davi
![]() Delphi Developer |
Fri, 07 Nov 2003 22:22:55 GMT
Re:Compact Database for MS Access in Delphi 5.0Hi, Further to my last post; I tried setting the Ds.Active = false at the beginning of the Compress procedure and Ds.Active = true at the end of procedure this resolves the errors with the Ds object. However I'm left with the err msg when trying to Exit the App from the main form, which I cannot see how to resolve. David Quote
|
1. How to compact MS. Access Database Files in Delphi
2. MS Access databases compacting by schedule!!!
3. Compacting MS Access Database
4. compact a MS ACCESS 97 Database
5. ADO - compact and repair MS Access database
6. Compacting MS Access 97 Database
8. Need Delphi Components for replication/compacting in MS Access