<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>CodeTrigger - General - Change db connection string at runtime/dynamically - Messages</title>
<link>https://www.codetrigger.com/forum/topic30-change-db-connection-string-at-runtimedynamically.aspx</link>
<description>CodeTrigger - General - Change db connection string at runtime/dynamically - Messages</description>
<language>en-us</language>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>Jitbit AspNetForum</generator>
<pubDate>Mon, 04 Dec 2017 15:15:16 GMT</pubDate>
<lastBuildDate>Mon, 04 Dec 2017 15:15:16 GMT</lastBuildDate>
<item>
<link>https://www.codetrigger.com/forum/topic30-change-db-connection-string-at-runtimedynamically.aspx</link>
<title>Message from migrator</title>
<description><![CDATA[<span style="font-family:Tahoma, "Sans Serif", Arial">Hi, there are some public properties that were created specifically for this purpose, i.e. changing the connectionstring at runtime.</span><br/><span style="font-family:Tahoma, "Sans Serif", Arial">Usage:</span><br/><span style="font-family:Tahoma, "Sans Serif", Arial">At an appropriate place in the code, you can override the connection string by setting it statically:</span><br/><br/><span style="font-family:Tahoma, "Sans Serif", Arial">DATACONN0_TxConnectionProvider.ConnectionString = "Server=xxx;Port=xx;Initial Catalog=etc etc";</span><br/><span style="font-family:Tahoma, "Sans Serif", Arial">DATACONN0_BaseData.StaticConnectionString = "Server=xxx;Port=xx;Initial Catalog=etc etc";</span><br/><br/><span style="font-family:Tahoma, "Sans Serif", Arial">both overrides would be necessary, one is just for queries (non-transactional) and the other provides transactional support.</span>]]></description>
<pubDate>Mon, 04 Dec 2017 15:15:16 GMT</pubDate>
</item>
<item>
<link>https://www.codetrigger.com/forum/topic30-change-db-connection-string-at-runtimedynamically.aspx</link>
<title>Message from migrator</title>
<description><![CDATA[<span style="font-family:Tahoma, "Sans Serif", Arial">What is the best way to set the connection string at run time, so the generated data and business objects point to a database specified by code. I need to use this in application where I can't specify the database in a app.config file, since it won't be accessible at runtime</span>]]></description>
<pubDate>Mon, 04 Dec 2017 15:13:07 GMT</pubDate>
</item>
</channel>
</rss>
