<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Microsoft Application Blocks</title><link>http://forums.asp.net/122.aspx</link><description>Discuss the various Patterns &amp; Practices Application Blocks for ASP.NET 1.x.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Passing connection string to Enterprise Library DAAB 3.1</title><link>http://forums.asp.net/thread/3188494.aspx</link><pubDate>Tue, 26 May 2009 16:26:49 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3188494</guid><dc:creator>GTL</dc:creator><author>GTL</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3188494.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=122&amp;PostID=3188494</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;If you know that it&amp;#39;s definitely an SQL database being used, you can just create a new SqlDatabase rather than GenericDatabase.&amp;nbsp; Worked for me!&lt;/p&gt;&lt;p&gt;&amp;nbsp;e.g:&lt;/p&gt;&lt;p&gt;&amp;nbsp;Database _db = new SqlDatabase(connectionString); &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Passing connection string to Enterprise Library DAAB 3.1</title><link>http://forums.asp.net/thread/2928611.aspx</link><pubDate>Mon, 09 Feb 2009 21:25:36 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2928611</guid><dc:creator>nasserdw</dc:creator><author>nasserdw</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2928611.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=122&amp;PostID=2928611</wfw:commentRss><description>hello,

i am facing problem passing connnection string to the entLib so i am using your method :

 public static Database CreateDatabase()
        {
            string connectionString = App_Settings.portalCnnStr;
            string dd = &amp;quot;System.Data.SqlClient&amp;quot;;
            return new GenericDatabase(connectionString,dd);   // dbProviderFactory = System.Data.SqlClient
        }

But the GenericDatabase takes string,DbProviderFactory   .. so how to pass second parameter?? i used several ways and in all it failed!!</description></item><item><title>Re: Passing connection string to Enterprise Library DAAB 3.1</title><link>http://forums.asp.net/thread/1760482.aspx</link><pubDate>Mon, 18 Jun 2007 23:50:39 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1760482</guid><dc:creator>bc1016</dc:creator><author>bc1016</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1760482.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=122&amp;PostID=1760482</wfw:commentRss><description>&lt;p&gt;You can write your own wrapper class to provide the CreateDatabase in this way by passing in the connection strings to the GenericDatabase() in DAAB:&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;span class="kwd"&gt;public static&lt;/span&gt; Database CreateDatabase(&lt;span class="kwd"&gt;string&lt;/span&gt; server, &lt;span class="kwd"&gt;string&lt;/span&gt; db, &lt;span class="kwd"&gt;string&lt;/span&gt; id, &lt;span class="kwd"&gt;string&lt;/span&gt; password, &lt;span class="kwd"&gt;bool&lt;/span&gt; integratedSecurity, &lt;span class="kwd"&gt;string&lt;/span&gt; dbProviderFactory)&lt;br /&gt;{&lt;br /&gt;&lt;span class="kwd"&gt;	string&lt;/span&gt; connectionString = &lt;span class="kwd"&gt;string&lt;/span&gt;.Format(&lt;span class="st"&gt;&amp;quot;Server={0};Database={1};Integrated Security={2};UID={3};PWD={4}&amp;quot;&lt;/span&gt;, server, db, integratedSecurity, id, password);&lt;br /&gt;&lt;span class="kwd"&gt;	return new&lt;/span&gt; GenericDatabase(connectionString, dbProviderFactory);   // dbProviderFactory = System.Data.SqlClient&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;It works for me.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Passing connection string to Enterprise Library DAAB 3.1</title><link>http://forums.asp.net/thread/1749678.aspx</link><pubDate>Mon, 11 Jun 2007 21:37:54 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1749678</guid><dc:creator>sk78</dc:creator><author>sk78</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1749678.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=122&amp;PostID=1749678</wfw:commentRss><description>&lt;p&gt;The company I work is considering to use the Enterprise Library&amp;nbsp;Data Access Application Block. The problem is an internal policy that forces all company systems to get the connection string from a sql server.&lt;br /&gt;&lt;br /&gt;Is there any way to just pass the connection string to the Data Access Application Block instead of getting it from the app.config or web.config?&lt;br /&gt;&lt;br /&gt;I dont see any overloaded methods on the &lt;font color="#2b91af" size="2"&gt;DatabaseFactory&lt;/font&gt;&lt;font size="2"&gt;.CreateDatabase() method. Pointers please!&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>