Skip to content

Add/Edit a Connection

This dialog is used to define connections to SQL data sources. The same dialog is used to add or edit a connection.

Database Type

Select the type of database you wish to use. This allows you to choose which driver to use for this connection. This list only displays drivers that support Managed Connections. Drivers for Managed Connections are loaded by the Studio as needed. To manually load drivers for the current workspace in the Studio, see Tools > Configure Database Drivers.

Connection Id

This allows you to define a Connection Id so you can use this connection as a Managed Connection. See SQL Connection Manager for more information on Managed Connections.

Enabled

By default, the Enabled checkbox is checked, making the Connection Id enabled for the workspace. Uncheck this if you already have another Connection Id with the same name defined and enabled for this workspace. See SQL Connection Manager for more information on Managed Connections.

The remainder of this dialog varies based on the Database type you choose.

Microsoft SQL Server ('MSSQLDRV' driver)

SQL Server Connect

Type the Server Name if you know it or click the Prompt button to browse for a SQL Server instance to connect to. The SQL Server Browser service must be enabled for you to be able to browse for available SQL Server instances.

Use Windows Authentication

Check this to use 'Windows Authentication'. If you leave this unchecked, you must enter a User Name and Password.

Store Password

Check this checkbox to store the password. The password will be encrypted and stored in the DfConnId.Ini file in the data folder or your workspace as a separate password (DFPWD=) for the DataFlex Studio and other DataFlex tools to use. Only the DataFlex tools will be able to decrypt this password.

If you use password encryption in your application, that password will be stored as a different encrypted password (PWD=) and only your application will be able to decrypt it. See pbEncryptPassword for more information.

Additional Connection String options

If you use additional connection attributes, enter the keyword-value pairs in this form.

Test Connection

This button will attempt to connect to the SQL Server instance you entered above using the credentials you provided.

Select or enter a Database Name

This allows you to specify a database on the SQL Server instance you entered above to be used with this connection.

Create Database...

Clicking this button will attempt to connect to the SQL Server instance you entered above using the credentials you provided. If it succeeds, you will be prompted for a database name. It will then attempt to create a database by that name and return the database name to the 'Select or enter a Database Name' form if it succeeds.

ODBC ('ODBC_DRV' driver)

DSN Connection String

Type the DSN Connection String for an ODBC DSN to connect to.

Custom (DSN-less) Connection String

Enter a complete ODBC connection string.

Select or enter an ODBC Data Source

This allows you to choose from available data sources on this server.

Show user data sources

This adds user DSNs to the combo list provided in 'Select or enter an ODBC Data Source'.

Show system data sources

This adds system DSNs to the combo list provided in 'Select or enter an ODBC Data Source'.

Select File DSN

This allows you to browse to a File DSN to use.

Extra

If you use additional connection attributes, enter the keyword-value pairs in this form.

Login ID

Enter a Login Id.

Password

Enter a password.

Store Password

Check this checkbox to store the password. The password will be encrypted and stored in the DfConnId.Ini file in the data folder or your workspace as a separate password (DFPWD=) for the DataFlex Studio and other DataFlex tools to use. Only the DataFlex tools will be able to decrypt this password.

If you use password encryption in your application, that password will be stored as a different encrypted password (PWD=) and only your application will be able to decrypt it. See pbEncryptPassword for more information.

ODBC Administrator

This button opens the ODBC Administrator Control Panel applet, which allows you to define ODBC data sources.

Test Connection

This button will attempt to connect to the ODBC DSN you entered above using the credentials you provided.

IBM DB2 ('DB2_DRV' driver)

DSN Connection String

Type the DSN Connection String for a DB2 DSN to connect to.

Custom (DSN-less) Connection String

Enter the credentials needed for the DSN-less connection.

Select or enter a DB2 Data Source

This allows you to choose from available data sources on this server.

Extra

If you use additional connection attributes, enter the keyword-value pairs in this form.

Login ID

Enter a Login Id.

Password

Enter a password.

Store Password

Check this checkbox to store the password. The password will be encrypted and stored in the DfConnId.Ini file in the data folder or your workspace as a separate password (DFPWD=) for the DataFlex Studio and other DataFlex tools to use. Only the DataFlex tools will be able to decrypt this password.

If you use password encryption in your application, that password will be stored as a different encrypted password (PWD=) and only your application will be able to decrypt it. See pbEncryptPassword for more information.

Test Connection

This button will attempt to connect to the IBM DSN you entered above using the credentials you provided.