Open SQL Connection Action
<AMSQLOPENCONNECTION CONNECTIONSTRING="Text" PREDEFINEDCONNECTION="MyPreDefinedConn" />
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. Use the Close SQL Connection action to close a SQL connection that is currently open.
This action also provides the option to create and name a new pre-defined connection string that can be used in subsequent steps and tasks.
Used to establish a persistent connection for use with other Database steps.
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.
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 the New button in the visual step editor.
Specifies a pre-defined 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 tasks.
This action includes the Description tab for entering a custom step description.
More on setting custom step description
This action also includes the standard Error Causes and On Error failure handling options/tabs.
More on Error Handling Options
All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.
More on variables
More on expressions
More on the expression builder
NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.
<AMSQLOPENCONNECTION CONNECTIONSTRING="AM19y9I4LjuL6WguODTn8/bbnUTt4T7/MaI+H6MBnYGRI69B6ya5BxTt32MGksD0w8XqvTNi3YyQwIsWCXLeCLQJdBjCzJFhKavzojej+o1zcu/FJ/gAVr45Q==aME" />
<AMSQLOPENCONNECTION PREDEFINEDCONNECTION="MyPredefinedConn" />