# Recommended use of connection names instead of strings when connecting to an external database

**URL:** <https://discuss.workflowgen.com/t/recommended-use-of-connection-names-instead-of-strings-when-connecting-to-an-external-database/1550>\
**Category:** Database\
**Created:** [January 9, 2020, 3:08pm UTC](https://discuss.workflowgen.com/t/recommended-use-of-connection-names-instead-of-strings-when-connecting-to-an-external-database/1550 "2020-01-09T15:08:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wfg-admin](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/wfg-admin/32/714_2.png) [@wfg-admin](https://discuss.workflowgen.com/u/wfg-admin)\
**Post date:** [January 9, 2020, 3:08pm UTC](https://discuss.workflowgen.com/t/recommended-use-of-connection-names-instead-of-strings-when-connecting-to-an-external-database/1550/1 "2020-01-09T15:08:24Z")

</div>

We strongly recommend using a connection name rather than a connection string in your custom solution or application code when connecting to an external database in order to simplify multi-environment management.

Connection string names are centrally managed in the WorkflowGen `web.config` file.

```auto
<configuration>
  <connectionStrings>
    <add name="MainDbSource" connectionString="..." providerName="System.Data.SqlClient" />
    <add name="ERP_DB" connectionString="..." providerName="System.Data.OleDb" />
    <add name="HR_DB" connectionString="..." providerName="System.Data.OracleClient" />
  </connectionStrings>
</configuration>

```

This applies to:

- Custom ASP.NET web form code-behind and databound controls

- Form Designer databound ListBox and DropDownListBox form fields

- Global Lists

- XMLTODATABASE transaction files
