# Connection

Within **SQL Builder**, ONEWEB provides a **Connection** feature that allows users to connect to a database and **execute SQL queries for validation and testing**.

The Connection feature enables users to:

* Reuse existing database connections configured in the application
* Create and manage new database connections
* Run SQL queries directly from SQL Builder to verify results

The **Connection** option is available in the **Side Menu** of SQL Builder.

***

### Access the Connection Menu

To access the Connection feature:

1. Open a **SQL Builder** project
2. Locate the **Connection** option in the Side Menu
3. Click **Connection**

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FP4P8u7c0duHkCK3HSvr4%2Fimage.png?alt=media&#x26;token=dd2b8ebc-7ce0-41c5-8410-42b665a9b19d" alt=""><figcaption></figcaption></figure>

This opens a dialog where users can either use an existing connection or configure a new one.

***

### Use an Existing Connection

To use an existing database connection:

1. Open the **Connection** dialog
2. Select a **Database**
3. Choose a **Server**
4. Select the **Database Schema**
5. Click **Set Active**

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FBJW96x92dNlZLBauv7IY%2Fimage.png?alt=media&#x26;token=941c3090-7ba6-45a4-b868-270f8a431036" alt=""><figcaption></figcaption></figure>

Once successfully connected, the active server and schema information are displayed in the Connection menu.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FbM4OxgCnXVOeDHaCgT5W%2Fimage.png?alt=media&#x26;token=33ba6efa-f08e-4f5a-9fdd-ff2cffff9853" alt=""><figcaption></figcaption></figure>

***

#### Browse Tables via Connection

After setting an active connection, users can explore database objects:

1. Expand **Connection**
2. Click the **Database Name**
3. Click the **Schema Name**

The available tables are shown and can be used when building SQL queries.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FIjJUhk1f1g2dZbFuqcdT%2Fimage.png?alt=media&#x26;token=b8ad41d1-95df-4400-a4d1-2381552e69fe" alt=""><figcaption></figcaption></figure>

***

### Configure a New Connection

If a suitable connection does not exist, users can create a new one.

To configure a new connection:

1. Open the **Connection** dialog
2. Click **New Connection**

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FLxNfO53gdWPkqK1oKPlA%2Fimage.png?alt=media&#x26;token=524efbff-5be8-4d00-85f7-207c9c5bcd28" alt=""><figcaption></figcaption></figure>

***

#### Step‑by‑Step Connection Wizard

1. **Select Database Engine**

Choose the database engine type (for example, Oracle, MySQL, PostgreSQL).

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FFU0MDubIPAlTrvQAHXsI%2Fimage.png?alt=media&#x26;token=e37dd064-48ae-4e1a-8f09-69059ab6d646" alt=""><figcaption></figcaption></figure>

***

2. **Enter Connection Details**

Provide required connection details such as:

* Host
* Port
* Database name
* Credentials

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FGW92LBATuuzXVJg3qDFg%2Fimage.png?alt=media&#x26;token=bcf1f2b2-e224-42d8-ac56-67e918184096" alt=""><figcaption></figcaption></figure>

***

3. **Configure Database Driver**

Users can:

* Select from existing database drivers
* Upload a new driver version if required

A sample driver is provided for reference.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FFjqzUIzuMnBZMyAkHE6R%2Fimage.png?alt=media&#x26;token=e45f588c-eead-403e-901b-8961e9515325" alt=""><figcaption></figcaption></figure>

***

### Test and Save the Connection

After completing the configuration:

1. Click **Test** to validate the connection
2. If the success alert is displayed, the connection is working

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FEuno52kLTcKmTcuIzNiK%2Fimage.png?alt=media&#x26;token=13eb4e24-f1a2-486c-99e1-a1ffbef77504" alt=""><figcaption></figcaption></figure>

3. Click **Close** on the alert
4. Click **Save & Done**

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FKeMxuOywYkA9k2WUXlG5%2Fimage.png?alt=media&#x26;token=ee7309ae-f136-4a8b-b5b1-ba0d4fd30c11" alt=""><figcaption></figcaption></figure>

***

### Manage Connections

Once created, the new connection appears in the **available connections list**.

Users can:

* **Edit** a connection
* **Delete** a connection\
  by clicking the icons next to the connection name.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FBs9j1f62EphS24J4ovF8%2Fimage.png?alt=media&#x26;token=d7dd1f06-e3b5-4982-9916-37c23ecad860" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2F4A1z61S2utovWUxTHjYF%2Fimage.png?alt=media&#x26;token=1cb0c147-ecf9-4cd8-ba73-7cb0e2304d81" alt=""><figcaption></figcaption></figure>

***

### Summary

The **Connection** feature in SQL Builder enables users to validate SQL queries directly against a database.

With this feature, users can:

* Reuse existing database connections
* Configure new database connections via a guided wizard
* Test connectivity before executing queries
* Browse schemas and tables interactively
* Verify SQL results during development

Connection management is a critical part of using **SQL Builder effectively** within ONEWEB’s low‑code **Database Tools** ecosystem.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onewebstack.com/oneweb-platform-th/building-apps/low-code-with-appspace/database-tools/sql-builder/connection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
