Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Paolo F Cantoni on May 08, 2009, 01:11:20 pm
-
When accessing an EA repository, there are three scenarios1:
- .EAP file (via File|Open)
- .EAP file (via Connection String)[/color]
- Server hosted database (via Connection String)
- Server hosted database via shortcut (Connection String embedded in shortcut)
The EA API (as mentioned in a number of posts) has a Repository.ConnectionString attribute.
Repository.ConnectionString: String; Read only. The filename/connection string of the current Repository.
Unfortunately (again, as mentioned many times), there is no standard mechanism to return the actual connection string (suitable for using in an OLEDB Connection) in all these three situations.
Can anyone (hint: Sparxians) provide a best practice code to detect which scenario is being invoked and to return the actual connection string in each scenario?
TIA,
Paolo
1 (if there are more, let me know and I'll update this)
-
Re: 1 perhaps add:EAP file acting as host database (i.e. via connection string versus direct 'file | open' process)
[/s]NOTE: Incorporated above.
-
Re: 1 perhaps add:- EAP file acting as host database (i.e. via connection string versus direct 'file | open' process)
Is that more explicit David?
Thanx,
Paolo
-
Yes, that's it.