Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic Connection Strings
Message
De
18/01/2007 04:10:04
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Dynamic Connection Strings
Divers
Thread ID:
01186536
Message ID:
01186536
Vues:
74
Hi Guys

I need to dynamically modify the connection string used by some of my business objects (DataAccess classes) based on some input from the user ie the physical location of the data (these objects will be using OleDb providers).

How can i go about doing this? My initial thoughts were to dynamically modify the connection strings contained within the app.config file. Kevin, perhaps you could point me in the right direction here. I see all the methods etc for reading data contained within the app.config, but how do you write this data?? Specifically the database connection keys.

I was looking into the mmAppConfiruation classes but could not see how to get this to work (even creating a subclass) as the key names ie \databaseKey\Connection is not a valid class field name.

Or is there a better way to go about doing this?

Thanks in advance,.

Darren
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform