Powered by Zoomin Software. For more details please contactZoomin

DataDirect Connect for ADO.NET Data Provider Help

Configuring Connection Strings

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

Connection string options can be defined directly in a connection string, or set in the Advanced Properties dialog box in Visual Studio (see "Defining Connection String Values in Server Explorer".

Notes:

  • On the first connection to a DB2 database, the data provider builds several DB2 packages, a process that can take several minutes. Subsequent connections to that server occur without this delay.
  • Make sure that the user who performs the initial connection to a DB2 database has the BINDADD permissions. If the user does not have the BINDADD permissions, the following error message is displayed:
Inadequate permission to create packages on the database server. Packages must be created once on each DB2 server that the DataDirect Connect for ADO.NET DB2 provider will connect to. The provider detected that the packages do not exist on this server and tried to create them, but could not due to the current user not having BINDADD permission on the DB2 server.

Constructing a Connection String

The table Default Values for DB2 Connection String Options lists the options and their defaults. The options are described fully in DB2 Data Provider Connection String Options.

The options have the form:

option=value

Each connection string option value pair is separated by a semicolon. For example, a user with the BINDADD permissions could use one of the following connection strings to make the initial connection:

  • DB2 for Linux/UNIX/Windows:

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

    "Host=10.30.14.109;Port=446;User ID=roger;Password=newm4n;Database=NCANSV5; Collection=ADOVS1"
    
  • DB2 for z/OS:

    "Host=10.30.14.109;Port=446;User ID=fred;Password=sailb0at;Database=CRDTU"
    

See Using Connection Strings for guidelines for the syntax and use of connection string options.

Defining Connection String Values in Server Explorer

See Creating a New Connection in Server Explorer for more information about using Visual Studio to add and modify connections.

To add a connection:

  1. Right-click the Data Connections node and select Add Connection.... The Add Connection window appears.

    Default values are displayed in the Host, Port, and Collection fields of the Add Connection window .

    Do one of the following steps:

    • If the DB2 data provider is not selected, click Change, and continue at Step 2.
    • If the DB2 data provider is selected, skip to Step 3.
  2. Select the DB2 data provider.

    Change Data Source window

    Do the following steps:

    a. In the Data source list box, select Progress DataDirect.
    b. In the Data provider drop-down list, select the DB2 data provider.
    c. If you want to use these selections for other connections, select the Always use this selection check box.
    d. If the DataDirect Connect for ADO.NETDB2 data provider is not listed in the Data provider drop-down list, use the Visual Studio Provider Integration Tool, located in the DataDirect Connect for ADO.NET program group. The DataDirect Connect for ADO.NET installation automatically integrates the data providers into Visual Studio. If you install the data providers before installing Visual Studio, or uninstall and reinstall Visual Studio, the DataDirect data providers do not appear in the Data provider drop-down list until you use the Visual Studio Provider Integration Tool.
    e. Click OK. The Add Connection window appears.

  3. Type values for the host name, port number, database, and collection. (See DB2 Data Provider Connection String Options for a description of the Host, Port, Database, and Package Collection connection string options.

  4. Choose the type of login authentication for the connection:

    • If you select Use Kerberos Authentication, you do not need to enter a User ID or Password. Continue to Step 5.
    • If you select Use DB2 Authentication, do the following steps:
    • Enter your User ID and Password. These values are required for authentication.
    • In the Security drop-down list, select the authentication method. By default, the User ID and Password are transmitted to the server as clear text.
  5. (Optional) If you want to save the password for the lifetime of connection instance defined in Server Explorer, select the Save my password check box.

  6. If you want to change other connection properties, continue to Step 7. Otherwise, click OK and skip to Step 9.

  7. Click Advanced... to specify additional provider-specific property values. The Advanced Properties window appears.

    The Advanced Properties window, with the Host property selected.

  8. To change the values in the Advanced Properties window, type a value into the field or select a value from a drop-down list. The value that appears in the field below the description of the property is added to the connection string. If you accept the default values, the connection string field remains unchanged. See DB2 Data Provider Connection String Options for a complete list of the properties and their descriptions.

  9. Click Test Connection. At any point during the configuration process, you can click Test Connection to attempt to connect to the data source using the connection properties specified in the Add Connection window.Then, take one of the following actions:

    • If the data provider can connect, it releases the connection and displays a Test connection succeeded message. Click OK to close the message box and return to the Add Connection window.

    • If the data provider cannot connect because of an incorrect environment or incorrect connection value, it displays an appropriate error message. Click OK to close the message dialog box and return to the Add Connection window.

    • If the data provider requires more information, the connection dialog box is displayed. Enter the required information and click OK to close the connection dialog box and return to the Add Connection window.

      NOTE: If you are configuring alternate servers for use with the connection failover feature, be aware that the Test Connection button tests only the primary server, not the alternate servers.

  10. Click OK or Cancel to close the Add Connection window. If you click OK, the values you have specified become the defaults when you connect to the data source. You can change these defaults by using this procedure to reconfigure your data source. You can override these defaults by connecting to the data source using a connection string with alternate values.

Default Values for Connection String Options

The connection string options are described in DB2 Data Provider Connection String Options. The following table lists the supported connection string options and their default values.

Default Values for DB2 Connection String Options

Connection String Option Default Value
Accounting Info An empty string
Alternate Servers An empty string
Application Name An empty string
Array Send Size 5120
Authentication Method ClearText
Batch Update Behavior ArrayBindWhenPossible
Catalog Schema An empty string
Certificate Store Location CurrentUser
Charset For 65535 An empty string
Client Host Name An empty string
Client User An empty string
Common Work Arounds 0
Connection Pool Behavior LeastRecentlyUsed
Connection Reset False
Connection Retry Count 0
Connection Retry Delay 3
Connection Timeout 15
Create Package False
Current Function Path An empty string
Current Schema An empty string
Cursor Description Cache True
Cursors With Hold True
Database Name An empty string
Default Qualifier An empty string
Default Schema Restriction An empty string (no restrictions are used)
Defer Prepare True
Dynamic Sections 200
Enable Manual Enlistment False
Enable Trace 0
Enable XA True
Encryption Method NoEncryption
Enlist False
Grant Execute True
Grantee PUBLIC
Host localhost
Host Name In Certificate An empty string
Initial Command Timeout 30
Initialization String An empty string
Isolation Level ReadCommitted
License Path An empty string. The data provider uses the product installation directory.
Load Balance Timeout 0
Load Balancing False
Max Pool Size 100
Max Pool Size Behavior HardCap
Max Statement Cache Size 10
Min Pool Size 0
New Password An empty string
Package Collection NULLID
Package Owner An empty string
Parameter Mode ADO.NET data provider: ANSI
Entity Framework data provider: BindByName
Password An empty string
Persist Security Info False
Pooling True
Port 446
Program ID An empty string
Reauthentication Enabled False
Schema Collection Timeout 120
Schema Options 0x7F or All except IgnoreUserPermissions
Server localhost:446
Socket Buffer Size 32
Sort Sequence Table HEX
Statement Cache Mode ExplicitOnly
Trace File An empty string
Use Column Labels False
Use Current Schema False
User ID An empty string
Validate Server Certificate True
Work Arounds 0
Xml Describe Type String
TitleResults for “How to create a CRG?”Also Available inAlert