enterprise Library Configuration

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello Everyone,

I am trying to add multiple connection strings in my web.config file. I
searched in google to find out how to add multiple connections strings
through enterprise library 2.0 , 2006.
All of them are mentioning that I can go to enterprise Library configuration
and go to file menu and open the web.config file of the existing web
application. I did that,
but when I open the web.config file. I see a tree of
DataAccesApplicationBlocks and under that connectionstrings and then
localSQLServer.
I don't see an application menu under Enterprise Library configurations. How
can I put multiple connection strings in web.config file and I am using
enterprise library 2006, 2.0 version.


Any help will be appreciated
 
Hello Everyone,

I am trying to add multiple connection strings in my web.config file. I
searched in google to find out how to add multiple connections strings
through enterprise library 2.0 , 2006.
All of them are mentioning that I can go to enterprise Library configuration
and go to file menu and open the web.config file of the existing web
application. I did that,
but when I open the web.config file. I see a tree of
DataAccesApplicationBlocks and under that connectionstrings and then
localSQLServer.
I don't see an application menu under Enterprise Library configurations. How
can I put multiple connection strings in web.config file and I am using
enterprise library 2006, 2.0 version.

Any help will be appreciated

Hi, CreateDatabase should have an overload which takes a string, and
you can use that to define multiple sections in your config for
multiple databases. Off the top of my head, just nest your current
connection details in a new named block and use that name in
CreateDatabase.
Cheers
 
Just to concur.

The overload of .CreateDatabase (string) is where you'll put in the
"instanceName".

Look in the .config file also. THere should be a "defaultInstance" name as
well.

THis is what is used when you call
..CreateDatabase() ; /// no string overload
 
Back
Top