The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Enterprise Library for .NET 1.1

Hello.  I'm using the data access application block in Enterprise Library for .NET 1.1.  I can connect to and use a hard coded database, but I would like to be able to add database connection strings to the dataconfiguration.config file programatically (similar to the Enterprise Library Configuration Console).  My application will allow the user to create a new database on the fly and then connect to it, so I need to be able to add the new connection string to the config file and then open it.

However, I haven't found a way to do it.  Any suggestions?
Data Access Application Block
Wednesday, February 08, 2006
 
 
Post your question in the .NET Questions forum: http://discuss.joelonsoftware.com/?dotnet
John Topley Send private email
Thursday, February 09, 2006
 
 
You might also try the application blocks forum on asp.net.
Mike Stephenson Send private email
Thursday, February 09, 2006
 
 
There's no ent.lib. built in support to do this (to my knowledge). You'll have to basically open the file, read the xml content, write yours, and write it back to the disk. programmtically.
nope..
Thursday, February 09, 2006
 
 
There is built in support - sort of.

The Data Access block, like everything else in Enterprise Library, handles its configuration data via the Configuration Block. What you'd need to do is open the data configuration file via the configuration block, make the appropriate changes, and save the file using the config block.

I unfortunately don't have actual code to show you, as I've never done it, but that's the direction I'd take.
Chris Tavares Send private email
Thursday, February 09, 2006
 
 
I suppose you want to store the settings for the application.
You could use the Configuration Application Block which is meant for that.
Vineet Reynolds Send private email
Friday, February 10, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz