Introduction
Macrobond SQL Database connector configuration file includes a section specifying data provider database connection string and connection string. It's unique to each database type. This page includes examples for most commonly used databases.
MySQL and MariaDB
Please install https://dev.mysql.com/downloads/connector/net/ and use:
<sql:DataProvider> <sql:Name>MySql.Data.MySqlClient</sql:Name> <sql:ConnectionString> Server=address.of.the.server; Database=dbname; Uid=user;Pwd=pass; </sql:ConnectionString> <!-- instead of Uid=user;Pwd=pass; you can use Uid={0};Pwd={1}; and and let Macrobond pass to the connection string credentials entered by the user from the in-house configuration dialog --> </sql:DataProvider>
MS SQL Server
There's no need to install the .NET Data Provider
<sql:DataProvider> <sql:Name>System.Data.SqlClient</sql:Name> <sql:ConnectionString> server=szcda41.m.domain.eu; database=nameofdb; User Id={0};Password={1} </sql:ConnectionString> <!-- login can be in form domain.name\some.login --> <!-- to use windows credentials replace Id=..;Password=.. with: security=SSPI --> </sql:DataProvider>
PostgreSQL
Please install npgsql driver from the 4.0.x branch (4.0.7 is known to work) and enable GAC installation. GAC installation is needed for the Macrobond application, newer versions of the npgsql do not provide such an option.
<sql:DataProvider> <sql:Name>Npgsql</sql:Name> <sql:ConnectionString> Database=nameofdb; Host=database.server.address; Port=5432; Username={0};Password={1}; </sql:ConnectionString> </sql:DataProvider>
Other databases
Please also see examples listed at https://www.dofactory.com/connection-strings
Note, MS Access is not supported.