# Connection String Examples

All connectors in Stadium are defined by ConnectionStrings. This page details how to construct them.

***

### Database

1. Connection Type\
   Select from this list: SQL Server, Oracle, or ODBC.
2. When using SQL Server:
   * Server Name\
     A SQL Server name. This is typically a / combination.
   * Authentication\
     The username and password combination to access the database server.
   * Use Windows Authentication\
     SQL Server can be set up to be accessible by using Windows credentials.
   * Select or enter a database name\
     The database you wish to access when using the connection. If the database server is accessible from the designer machine, then you can use the drop-down to find the database.
3. When using Oracle:
   * Server Name\
     An Oracle server name. This is typically a / combination.
   * Authentication\
     The username and password combination to access the database server.
4. When using ODBC:

   * DSN Name\
     Use the System DSN name you specified when setting up your ODBC Datasource.\
     For further assistance, go [here](https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-configuration-dsn-windows-5-2.html) for details on how to create a DSN.

   An alternative to using DSN is to use a connection string that contains the ODBC driver details, as set out below.

   * Authentication\
     The username and password combination to access the database server.
   * Select or enter a database name\
     The database you wish to access when using the connection. If the database server is accessible from the designer machine, then you can use the drop-down to find the database.

**Using an ODBC driver name to make a connection**

1. Add a Database Connector by clicking the Connector button in the toolbar.
2. Close the Database Connection Editor without adding any connection details.
3. Go to the Properties panel of your Database Connector to add the relevant connection details:

* Set the Connection Type to ODBC.
* Type in your Connection String.

  Example: Driver={MySQL ODBC 8.0 ANSI Driver};Server=localhost;Port=3306;Database=sakila;User=xxxxx;Password=xxxxx;

For more help on connection strings go to [connectionstrings.com](https://www.connectionstrings.com/)

***

### File System

1. **Path**

   This is the folder path on the server or network that will be made accessible via this connector.

   *Note:* Stadium currently supports [UNC paths](https://www.lifewire.com/unc-universal-naming-convention-818230), but not mapped drives yet.
2. **User**

   The username to gain access to the folder. This is in the format of \\.\
   If no value is provided for this property, the Application Pool User will be used.
3. **Password**

   The password that will be used in combination with the username to gain access to the folder.

***

### Web Service

1. **Base URL**

   This is the base URL of the web service.
2. **Timeout**

   This value corresponds to the duration in seconds before a request to the web service times out.
3. **Authentication**

   Available options:

   * *Anonymous* - For web services requiring no authentication.
   * *Basic* - For web services requiring the HTTP basic method of authentication. Required: username and password.
   * *Api Key* - For web services requiring authentication through an API key. Required: key name, key value, and key location (QueryString/Header/Cookie).
