Open SQL Connection Action

Description

Opens a database connection using the specified custom connection string or predefined connection string. The connection is identified by a unique session name, which can be referenced by subsequent SQL steps. This allows multiple SQL connections to run simultaneously.

Also provides the option to create and name a new pre-defined connection string that can be used in subsequent steps and Workflows.

Practical Use

Used to establish a persistent connection for other Database steps.

Declaration

<AMSQLOPENCONNECTION CONNECTIONSTRING="Text" PREDEFINEDCONNECTION="MyPreDefinedConn" />

Examples

<AMSQLOPENCONNECTION CONNECTIONSTRING="AM19y9I4LjuL6WguODTn8/bbnUTt4T7/MaI+H6MBnYGRI69B6ya5BxTt32MGksD0w8XqvTNi3YyQwIsWCXLeCLQJdBjCzJFhKavzojej+o1zcu/FJ/gAVr45Q==aME" />

<AMSQLOPENCONNECTION PREDEFINEDCONNECTION="MyPredefinedConn" />

General Tab Parameters

Session Name: Specifies the session name to identify this connection request in subsequent SQL steps. This allows several connections to be active simultaneously. If you are only using one connection at a time, do not specify a value other than the default.

Text, Optional - Default "SQLSession1"
MARKUP: SESSION="SQLSession2"

Connection String—Custom: Specifies a custom OLEDB connection string. The connection string provides driver, server, username, password and other important information to the OLEDB subsystem so that the connection can be made. The easiest way to generate a proper connection string is by clicking New in the visual step editor.

Text, Optional
MARKUP:
CONNECTIONSTRING="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Common Files\Borland Shared\Data\BCDEMOS.mdb"

Connection String—Pre-defined: Specifies a predefined OLEDB connection string. An existing pre-defined connection string can be specified by name, or a custom connection string can be defined as above, named, and stored. A newly created pre-defined connection string will be available for use in subsequent steps and Workflows.

Text, Optional
MARKUP: PREDEFINEDCONNECTION="MyPreDefinedConn"

Advanced Tab Parameters

Time Out After: Specifies the amount of seconds to attempt to establish a connection before timing out at the server level.

Number, Optional Default - 0
MARKUP: TIMEOUT="500"

Prompt User for Name and Password: Specifies that the user should be prompted with a username and password for the database server each time the Workflow is run.

Yes/No, Optional - Default - NO
MARKUP: LOGIN="YES"