XmlToDatabase: How to use a web.config connection string?

In some situations you may need to use a connection string defined in the web.config file. Since WorkflowGen version 5.6.2, you can specify the connection string name to use in the XMLTODATABASE transaction file via a new connectionstringname attribute defined in the database XML node.

It’s strongly recommended to use 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.

XMLTODATABASE transaction file:

...  
<database name="MYDB" connectionstringname="**MYDBSOURCE**" >   
..

web.config file:

..  
 <connectionStrings>  
 <add name="**MYDBSOURCE**" connectionString="Data Source="Data Source=MYSQLSERVER;Initial Catalog=MYDB;User ID=user;Password=pwd;" providerName="System.Data.SqlClient" />  
 </connectionStrings>  
...