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

Title: REAL Connection String
Post by: Paolo F Cantoni on May 08, 2009, 01:11:20 pm
When accessing an EA repository, there are three scenarios1:
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)
Title: Re: REAL Connection String
Post by: «Midnight» on May 08, 2009, 09:57:29 pm
Re: 1 perhaps add:[/s]NOTE: Incorporated above.
Title: Re: REAL Connection String
Post by: Paolo F Cantoni on May 11, 2009, 03:21:36 pm
Quote
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
Title: Re: REAL Connection String
Post by: «Midnight» on May 11, 2009, 09:29:54 pm
Yes, that's it.