Powered by Zoomin Software. For more details please contactZoomin

DataDirect Connect for ADO.NET Data Provider Help

Defining Basic Connection Strings

  • Last Updated: April 16, 2026
  • 8 minute read
    • ADO.NET
    • Documentation

Each data provider uses a connection string to provide information needed to connect to a specific database. The connection information is defined by connection string options.

The connection string options have the form:

option=value

Each connection string option-value pair is separated by a semicolon. For example:

Host=Accounting;Port=446;User ID=John;Password=T0uchd0wn

The following sections describe the minimum connection string values needed to a database:

  • Connecting to DB2
  • Connecting to Oracle
  • Connecting to Microsoft SQL Server
  • Connecting to Sybase

See the connection string option section for the data provider for detailed information about all of the supported options.

Notes:

  • The spaces in the connection string option names are not required, that is, User ID is the same as UserID.
  • All connection string option names are case-insensitive. For example, Password is the same as password. However, the values of some connection string options, such as User ID and Password, may be case-sensitive.
  • If the connection string contains invalid connection string options, the data provider returns an error.

Connecting to DB2

The following table lists the name and description for each connection string option required for a minimum connection to a DB2 server using an ADO.NET data provider or an Entity Framework data provider. See DB2 Data Provider Connection String Options for a description of all DB2 connection string options.

The following examples provide the minimum required options for a connection string for a user with the BINDADD permissions.

  • DB2 for Linux/UNIX/Windows:

    "Host=Accounting1;Port=50000;User ID=gene;Password=b0gey;Database=Accounting"
    
  • DB2 for i

        "Host=2001:DB8:0000:0000:8:800:200C:417A;Port=446;User ID=roger;Password=newm4n;Database=NCANSV5;Collection=ADOVS1"
    
  • DB2 for z/OS:

    "Host=10.30.14.109;Port=448;User ID=fred;Password=sailb0at;Database=S390LOC_7U"
    

Connection String Options Required for DB2

Connection String Option Description
Database Specifies the name of the database to which you want to connect.
NOTE: For DB2 for z/OS, use the name of the DB2 location that you want to access. Your system administrator can determine the name of your DB2 location using the following command: DISPLAY DDF
Host Specifies either the name or the IP address of the server to which you want to connect. For example, if your network supports named servers, you can specify a server name such as DB2server. Or, you can specify an IP address such as 199.226.224.34. Note that both IPv4 and IPv6 formats can be used to identify the host. See Using IP Addresses for details on using IP addresses.
To connect to a DB2 server running on the local machine, specify localhost as the Host connection string option.
Password Specifies the case-sensitive password used to connect to your DB2 database.
Port Specifies the port of the DB2 DRDA listener.
The initial default is 446.
User ID Specifies the case-sensitive DB2 logon ID to use for this connection.

Adding the Provider Schema Attribute

Provider is an attribute of the Schema element in the storage model file of an Entity Data Model (EDM). The storage model file is written in the store schema definition language (SSDL).

The Entity Data Model wizard assigns the value when you select the DB2 Entity Framework data provider. If you manually define an EDM, assign the string DDTek.DB2 to the Provider attribute of the Schema element, as shown in the following code fragment:

<Schema Namespace="AdventureWorksModel.Store" Alias="Self" Provider="DDTek.DB2" ProviderManifestToken="DB2iSeries" xmlns:store="https://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="https://schemas.microsoft.com/ado/2006/04/edm/ssdl">

Connecting to Oracle

The following table gives the name and description for each connection string option required for a minimum connection to an Oracle server using an ADO.NET data provider or an Entity Framework data provider. The defaults listed are initial defaults that apply when no value is specified in the connection string. See Oracle Data Provider Connection String Options for a description of all of the connection string options.

The minimum required options for the connection string are shown in the following example:

"Host=Accounting1;Service Name=sales.us.acme.com;User ID=scott;Password=Tiger"

Note: In most cases, the Oracle port number is the initial default, 1521. If you are using a different port, you must add the Port connection string option. See Port for more information.

Connection String Options Required for Oracle

Connection String Option Description
Host Specifies either the name (if your network supports named servers) or the IP address of the server to which you want to connect. For example, OracleAppServer or 122.23.15.12. See Using IP Addresses for details on using IP addresses. The initial default is an empty string.
Password Specifies a case-insensitive password used to connect to your Oracle database. A password is required only if security is enabled on your database. If so, contact your system administrator to get your password.
Service Name Specifies the Oracle service name that identifies the database used for the connection. The service name is a string that is the global database name—a name that comprises the database name and domain name. For example: sales.us.acme.com. This property is useful to specify connections to an Oracle Real Application Clusters (RAC) system rather than a specific Oracle instance because the nodes in a RAC system share a common service name. If using a tnsnames.ora file to provide connection information, do not specify this property.
User ID Specifies the case-insensitive default user name used to connect to your Oracle database. A user name is required only if security is enabled on your database. If so, contact your system administrator to get your user name.

Connecting Using the Oracle tnsnames.ora File

The DataDirect Connect for ADO.NET Oracle data provider does not require the Oracle client. However, some users already have the client installed on their machines and have a tnsnames.ora file configured.

If your machine has the tnsnames.ora file configured, you can use a connection string with the following minimum connection string options:

"Data Source=datasource;User ID=userid;Password=password;"

The following table gives the name and description for each connection string option required for a minimum connection to an Oracle server for a machine that has a tnsnames.ora file. The defaults listed are initial defaults that apply when no value is specified in the connection string. See Oracle Data Provider Connection String Options for a description of all of the Oracle data provider’s connection string options.

Connection String Options If a tnsnames.ora File Is Configured

Connection String Option Description
Data Source Specifies a net service name in the tnsnames.ora file. If the TNSNames File connection string option is not specified, the path is taken from the Oracle section of the Registry.
The initial default is an empty string.
Password Specifies a case-insensitive password used to connect to your Oracle database. A password is required only if security is enabled on your database. If so, contact your system administrator to get your password.
User ID Specifies the case-insensitive default user name used to connect to your Oracle database.

Adding the Provider Schema Attribute

Provider is an attribute of the Schema element in the storage model file of an Entity Data Model (EDM). The storage model file is written in the store schema definition language (SSDL).

The Entity Data Model wizard assigns the value when you select the Oracle data provider. If you manually define an EDM, assign the string DDTek.Oracle to the Provider attribute of the Schema element, as shown in the following example:

<Schema Namespace="AdventureWorksModel.Store" Alias="Self" Provider="DDTek.Oracle" ProviderManifestToken="10g" xmlns:store="https://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="https://schemas.microsoft.com/ado/2006/04/edm/ssdl">

Connecting to Microsoft SQL Server

The following table gives the name and description for each connection string option required for a minimum connection. See SQL Server Data Provider Connection String Options for a description of all of the connection string options.

Note: In most cases, the Microsoft SQL Server port number is the default, 1433. If you are using a different port, you must add the Port connection string option. See Port for more information.

The following connection string contains the minimum information necessary to connect to a Microsoft SQL Server server:

"Host=Accounting1;User ID=mike;Password=b0gey;Database=Accounting"

Connection String Options Required for Microsoft SQL Server

Connection String Option Description
Database Specifies the name of the database to which you want to connect. If you do not specify a value, the default is the database defined by the system administrator for each user.
Alias: Database Name. If both the Database and Database Name options are specified, the value specified for the Database option is used.
Host Specifies either the name or the IP address of the server to which you want to connect. For example, if your network supports named servers, you can specify a server name such as SQLSrvr3. Or, you can specify an IP address such as 199.226.224.34. See Using IP Addresses for details on using IP addresses.
To specify a Microsoft SQL Server server running on the local machine, specify localhost.
Password Specifies the case-sensitive password used to connect to your Microsoft SQL Server database.
User ID Specifies the case-insensitive user name used to connect to your Microsoft SQL Server database.

Connecting to Sybase

The following table gives the name and description for each connection string option required for a minimum connection to a Sybase server using an ADO.NET data provider or an Entity Framework data provider. See Sybase Data Provider Connection String Options for a description of all of the connection string options.

The following connection string contains the minimum information necessary to connect to a Sybase server using an ADO.NET data provider or an Entity Framework data provider:

"Host=Accounting1;Port=4100;User ID=jimb;Password=r0ger;Database=Accounting"

Connection String Options Required for Sybase

Connection String Option Description
Database Name Specifies the name of the database to which you want to connect. If you do not specify a value, the default is the database defined by the system administrator for each user.
Alias: Database
Host Specifies either the name or the IP address of the server to which you want to connect. If your network supports named servers, you can specify a server name such as Sybaseserver. Or, you can specify an IP address such as 199.226.224.34 or 2001:DB8:0:0:8:800:123.456.78.90. See Using IP Addresses for details on using IP addresses.
To use a Sybase server running on the local machine, specify localhost.
Password Specifies the case-sensitive password used to connect to your Sybase database.
Port Specifies the port of the Sybase listener.
The initial default is 4100.
User ID Specifies the case-insensitive user name used to connect to your Sybase database.

Connecting Using the Sybase Interfaces File (SQL.INI)

The DataDirect Connect for ADO.NET Sybase data provider does not require the Sybase client. However, some users already have the client installed on their machines and have an interfaces file configured.

If your machine has the Sybase interfaces file configured, you can use a connection string with the following minimum connection string options:

"User ID=lucy;Password=quest;Server Name=Accounting"

The following table gives the name and description for each connection string option required for a minimum connection to a Sybase server for a machine that has an interfaces file. See Sybase Data Provider Connection String Options for a description of all of the connection string options.

Connection String Options if an Interfaces File Is Configured

Connection String Option Description
Password Specifies the case-sensitive password used to connect to your Sybase database.
Server Name Specifies the name of the section in the Interfaces file that contains the network connection information for the Sybase database you want to access. The section name typically is the host name of the server that contains the Sybase database you want to access.
In the connection string, use Server Name with the Interfaces File connection string option.
User ID Specifies the case-insensitive user name used to connect to your Sybase database.

Adding the Provider Schema Attribute

Provider is an attribute of the Schema element in the storage model file of an Entity Data Model (EDM). The storage model file is written in the store schema definition language (SSDL).

The Entity Data Model wizard assigns the value when you select the Sybase Entity Framework data provider. If you manually define an EDM, assign the string DDTek.Sybase to the Provider attribute of the Schema element, as shown in the following code fragment:

<Schema Namespace="AdventureWorksModel.Store" Alias="Self" Provider="DDTek.Sybase" ProviderManifestToken="15" xmlns:store="https://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="https://schemas.microsoft.com/ado/2006/04/edm/ssdl">
TitleResults for “How to create a CRG?”Also Available inAlert