I hant to be able to call DatabaseFactory.CreateDatabase(), i.e. with no parameter to indicate which connection string to pull from my config file. I only have one connection string in my config file. The only help I have found on the internet is instructions to indicate the default connection string using the Enterprise Library Configuration tool (by right-clicking on my config file in Visual Studio). But from there, I see no way to "select" a connection string or mark it to be the default.
Asked
Active
Viewed 1,740 times
1 Answers
1
YOu should define the dataConfiguration section in your config
<configuration>
<configSections>
<section name="dataConfiguration" ...
And then set the value
<dataConfiguration defaultDatabase="ConnectionStringName" />

keithwarren7
- 14,094
- 8
- 53
- 74
-
Thanks. FYI for others, this tag just needs to be within the main
tag. – strongopinions Oct 20 '09 at 00:43 -
`
` – Ravi M Patel Aug 09 '17 at 16:58