FormatDSN

Metreos.Native.Database.FormatDSN

Summary

FormatDSN constructs a database connection string using the specified arguments for a particular database type.

Usage

FormatDSN is used to create a database connection string, which can then be subsequently used in DSN in the OpenDatabase action.

Remarks

This action does not communicate with a database. It is only used to format the database connection string.

Currently, the only supported database type is mysql.

Action Parameters
Parameter Name.NET TypeDefaultDescription
Type *Metreos.Utilities.Database+DbTypeoracleThe type of database to connect to. The following are the possible values:
oracle

Creates a database connection string for the .NET-provided Oracle Data Provider (not implemented).

sqlserver

Creates a database connection string for the .NET-provided SQL Server Provider (not implemented).

mysql

Creates the database connection string for the MySQL-provided Data Provider.

odbc

Creates the database connection string for an ODBC data source (not implemented).

DatabaseName *System.StringThe name of the database.
Server *System.StringThe IP address or host name of the database.
PortSystem.UInt163306The port of the database.
Username *System.StringThe username with the correct permissions to open the database connection and perform the necessary SQL statements for this script.
Password *System.StringThe password for the user specified in Username.
PoolingSystem.BooleantrueWhether to pool the connection. The default of true is typically recommended.
ConnectionTimeoutSystem.UInt320The amount of time to wait before canceling the attempt to open the database connection.
Result Data
Parameter Name.NET TypeDescription
DSNSystem.StringThe formatted database connection string.

Branch Conditions 

Success

No description.

Failure

No description.