> For the complete documentation index, see [llms.txt](https://docs.wirebootstrap.com/query-service/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wirebootstrap.com/query-service/administration/data-connections.md).

# Data Connections

## Connections

Use the *Connections* tab to create connections to databases.  A data connection is specified in a query request and tells the query service how to connect to a database.  Examples on using data connections in requests can be found in the [Sample Project](/query-service/sample-project.md) documentation.

The details in a data connection are used in conjunction with a connection string template to create a connection string at run-time.  Visit [Service Data File](/query-service/administration/service-configuration.md#data-file) for details on how this connection string is created.

![WireBootstrap Query Service Connections](/files/-MbdD3NhXEt5_nFInINb)

The grid at the top of the tab view contains a list of existing data connections.  Click on a connection in the grid to edit it.  The fields in the form below will be populated with the selected connection.

## Operations

![](/files/-MbdCS1vQyP7JHokRNDA)

Use the *Delete* button just below the grid to delete the connection.

Use the *Save* button to save any changes to a connection.

Use the *New* button to create a new connection.

Use the *Test* button to test a new or existing connection.

## Fields

Use the fields at the bottom of the Connections tab to create or edit a data connection.

![Data Connection Fields](/files/lX44ktfQkbu1G8XReB64)

The *Connection Id* field uniquely identifies a connection.  It is used in query requests to tell the query service the connection details to use in connecting to a database.  For examples on using data connections in query requests, visit the [Sample Project](/query-service/sample-project.md) documentation.

The *Connection Name* field is a descriptive name for the connection.

Use the *Auto-Name* checkbox to have both the *Connection Name* and *Connection Id* field automatically set based on the values in the *Service* and *Database* fields.

The *Server* field is the name of the server hosting the database service.

The *Database* field is the name of the database within the database service.  Click the *Refresh* button next to this field to refresh the list of databases after making changes to connection field values this field.

The *Port* field is an optional TCP port number on which the database service is listening.  A default value of `0` means no port should be included when connecting to the database.

The *User Name* field contains the user name within the database service that is to be used to connect to the database.

The *Password* field is to be used with the user name when connecting to the database.

Use the *Windows Authentication* checkbox to specify that the credentials of the account hosting the WireBootstrap Query Service Windows service be used to connect to the database.

The *Command Timeout* field contain the number of seconds to wait for queries to be executed against the database before timing out.  A default value of `0` uses the default for the connection provider which is 30 seconds.

## Data File

Data connections are stored in a JSON file called `wire-qs-connections.json`in  the installation root. An example of the contents of the file is below.

![](/files/-MTxSEh4AVkmsVB5K-Lm)

The file contains an array of connection objects with the field data specified for each connection.
