Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic Connection Strings
Message
From
18/01/2007 04:10:04
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Dynamic Connection Strings
Miscellaneous
Thread ID:
01186536
Message ID:
01186536
Views:
66
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
Next
Reply
Map
View

Click here to load this message in the networking platform