ExportOpenConnection
Opens a connection to the database specified as the parameter.
Syntax
bool ExportOpenConnection (strParam)Parameters
The Connection String of the target export database. Use Smart parameters to avoid clear text passwords in your application.Returns
True, if the connection opens. Otherwise, False.Level
All, but most often used at the Batch level.Details
Opens a connection to the database specified as the parameter.A rule that contains this action can apply to any object of the Document Hierarchy, but it is most often used at the batch level.
- Example:
ExportOpenConnection("@APPVAR(values/dsn/exportdb:cs)")Note: This action must come before any other ExportDB actions. This example uses smart parameters to obtain the connection string from the application service where the custom connection string keyexportdbwas created in the Custom Values tab. It provides a single location for the connection string and security for passwords.Note: If the action is establishing a connection with an Oracle database, or a SQL Server database using SQL Server Authentication, be sure to expand the DSN parameter by adding the correct Provider, user ID and Password. For example:- Oracle:
ExportOpenConnection("PROVIDER=ODBCORACLE;DSN=1040Look;CATALOG=;DBNTA=;UID=Admin;PWD=Admin;") - SQL Server Authentication:
ExportOpenConnection("PROVIDER=ODBCMSSQL;DSN=1040Look;CATALOG=;DBNTA=;UID=Admin;PWD=Admin;")
Note: Although the Oracle and SQL Server examples show the connection string, it is recommended that a smart parameter is used to obtain the connection string from the application service, as shown in the first example, to provide password security and application portability.- Oracle: