The web.config approach would likely be the best way, but if you're installing the module remotely you'll have to remember to setup the web.config file, or use the XMLMerge functionality that is available in DNN. I've got an example for adding information to the web.config file in my DNNSimpleArticle module https://dnnsimplearticle.codeplex.com/SourceControl/latest#cs/dnnsimplearticle.dnn look at the config section
<component type="Config">
<config>
<configFile>web.config</configFile>
<install>
<configuration>
<nodes>
<node path="/configuration/dotnetnuke/sitemap/providers" action="update" key="name" collision="overwrite">
<add name="DNNSimpleArticleSiteMapProvider" type="Christoc.Modules.dnnsimplearticle.Providers.Sitemap.Sitemap, DNNSimpleArticle" providerPath="~\DesktopModules\dnnsimplearticle\Providers\Sitemap\" />
</node>
</nodes>
</configuration>
</install>
<uninstall>
<configuration>
<nodes />
</configuration>
</uninstall>
</config>
</component>
That will add a new sitemap provider,but you could tweak for connection strings instead.
Two other options.
Hard code the connection string in your module, not idea from flexibility perspective.
Create a module setting and store the connection string there. That will allow you to at least change it through the UI in DNN.