Book a Demo

Author Topic: API to compact a .EAP file.  (Read 6942 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
API to compact a .EAP file.
« on: November 29, 2016, 12:27:13 pm »
A quick search of the forum suggests there is not an API call to directly compact a repository from EA.

I couldn't find one in the Help system.

Is that correct?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: API to compact a .EAP file.
« Reply #1 on: November 29, 2016, 09:43:18 pm »
I'd guess so. But that's Mickeysoft functionality. There might exist official APIs to compact an Access file.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: API to compact a .EAP file.
« Reply #2 on: November 30, 2016, 10:27:07 am »
I'd guess so. But that's Mickeysoft functionality. There might exist official APIs to compact an Access file.

q.
Yes, I can do it by spawning a subprocess to use Access to compact (we already spawn ZIP to create a compressed archive), but it's a lot of work for functionality that's already in already in EA - just not accessible (pun intended).

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: API to compact a .EAP file.
« Reply #3 on: November 30, 2016, 12:04:56 pm »
Yes, I can do it by spawning a subprocess to use Access to compact (we already spawn ZIP to create a compressed archive), but it's a lot of work for functionality that's already in already in EA - just not accessible (pun intended).

My assumption would be that it isn't in EA at all, but EA calls the API for the data layer.  The method might be called something like JetCompact for example.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: API to compact a .EAP file.
« Reply #4 on: November 30, 2016, 08:25:09 pm »
Most likely. But of course it would be more convenient if the AP could provide the manual methods in its API.

q.

Eamonn John Casey

  • EA User
  • **
  • Posts: 110
  • Karma: +0/-1
    • View Profile
Re: API to compact a .EAP file.
« Reply #5 on: December 07, 2016, 03:18:04 am »
To do this you need to rename the local EAP file to MDB (Microsoft Access Database).

In under ODBC Data Sources (Start -> ODBC), select Microsoft Access as the your User Data Source. Click on the Select button to find your database¨. Then click on the Compact button. Job done.

Rename MDB back to EAP so Enterprise Architect can find it.

Eamonn J.

Eamonn John Casey

  • EA User
  • **
  • Posts: 110
  • Karma: +0/-1
    • View Profile
Re: API to compact a .EAP file.
« Reply #6 on: December 07, 2016, 03:20:45 am »
Amend:
ADO and DAO APIs for Microsoft access provide compact functionality if you want to do this programmatically.
For example: http://stackoverflow.com/questions/3503736/access-compact-and-repair-programatically