Configure the connection strings

You use connection strings to copy and move Datacap applications to a database in another environment. Connection strings contain the information that is needed by the database provider to establish a connection between the application and the database.

When you connect your application to a database, ADO uses a database provider to make the connection to the database. The supported database providers for which you can configure connection strings are Microsoft Access, Microsoft SQL Server, Oracle, and DB2® . The old Datacap format connection strings are still supported to provide compatibility with an earlier version to your existing database connections.

Database providers make the connection to a database in different ways so you must write the connection string for the database provider that you want to use. For example, the database provider needs the address of the database server to connect to. You specify the address in the connection string to tell the database provider where to connect.

If you do not specify connection strings for an existing application, the database provider uses the connection strings that are currently configured on the application.

The following examples describe OLEDB connection strings for each of the supported database providers:
DB2 by using Standard Authentication
This example describes the primary database. The Data Source value is the database alias name that is cataloged from the Database Server that is installed on Datacap Server. The Hostname and Database values can be empty.
"Provider=IBMDADB2;Data Source=dcdb141;UID=******;PWD=******;
CurrentSchema=db2admin;"
This example describes the secondary database, which already exists. The Hostname value is the IP address of the remote Database Server. The Database value is the name of the database that is installed on the Database Server. The DataSource value can be empty.
"Provider=IBMDADB2;Hostname={IP address};Data Source=;Database=dcdbNUI;
Password=******;User ID=******;"
DB2 by using Windows Authentication
N/A
Microsoft Access by using Standard or Windows Authentication
"Provider=microsoft.jet.oledb.4.0;data source=C:\Datacap\MyApp\MyAppadm.mdb;
persist security info=false;"
SQL Server by using Standard Authentication
"Provider=sqloledb;data source=myServerAddress;Initial Catalog= myDataBase;
User Id=myUsername;Password=myPassword;"
SQL Server by using Windows Authentication
"Provider=sqloledb;data source=myServerAddress;Initial Catalog= myDataBase;
Integrated Security=SSPI;"
Oracle by using Standard Authentication
Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;
Password=myPassword;
Oracle by using Windows Authentication
Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;OSAuthent=1;
MSOLEDB using Windows Authentication
Provider=MSOLEDBSQL;Server=SQLSERVER;Database=DatacapAdm;UID=******;PWD=******;
Provider=MSOLEDBSQL;Server=SQLSERVER;Database=DatacapAdm;Integrated Security=sspi;
MSOLEDB using Windows Authentication for SQL Server AlwaysOn
Provider=MSOLEDBSQL;Server=SQL_AG;Database=TestAonDB917;Integrated Security=sspi;MultiSubnetFailover=True;WSID=WIN2016-DAN\SQLAON_NODE2;APP=Microsoft® Windows® Operating System;Description=DescriptionHere1;