How to retrieve default connection name

Topics: Data Access Application Block
Jul 2, 2007 at 9:34 AM
Hi,
I'd like to retrieve the default connection name in order to drive the DatabaseFactory.CreateDatabase("name") method. Someone know how to do ?

Thanks,
Luca
Jul 2, 2007 at 3:09 PM
Hi Luca,

This should work:
((DatabaseSettings)ConfigurationSourceFactory.Create().GetSection(DatabaseSettings.SectionName)).DefaultDatabase;

Fernando
Jul 2, 2007 at 3:27 PM
Fernando,
it works very well.

With this method (cofigurationfactory) I uderstand that I can get all EL data I need from configuration file also...

thank you very much !!

Luca