---
title: Setting a default datasource
---

In the root of your project, there is a file called `Application.bx`. This is a BoxLang class which defines certain settings for all the files and folders underneath it. This makes those files and folders work together as one application, hence the name. 

In the Application.bx file, make the following changes. Setting `this.datasource` defines a default datasource that all queries to the DB will use unless they are told specifically to use another one. 

```html linenums="1" insert="5" delete="4" title="Application.bx"
class {

    this.name = 'yourDatasourceName';
    this.dsource = 'yourDatasourceName';
    this.datasource = 'yourDatasourceName';
    this.sessionmanagement = 'true';

    public function onApplicationStart() {
        application.datasource = this.datasource;
    }
        
}

```
