views:

139

answers:

1

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.

A: 

YOu should define the dataConfiguration section in your config

<configuration>
<configSections>
<section name="dataConfiguration" ...

And then set the value

<dataConfiguration defaultDatabase="ConnectionStringName" />
keithwarren7
Thanks. FYI for others, this tag just needs to be within the main <configuration> tag.
strongopinions