# MosOdbc

The MosOdbc object contains methods used for interaction with a database via the ODBC driver.&#x20;

{% hint style="warning" %}
Please note that calling any function of the *MosOdbc* object will immediately put the script module into demo mode if it is not licensed
{% endhint %}

### Methods <a href="#h.dlb4khgqvtip" id="h.dlb4khgqvtip"></a>

| **Name**                                 | **Description**                                                                                                                                                                                      |
| ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| executeNonQuery(connectionString, query) | Executes an SQL script and does not return any result. Accepts ODBC string of connection to the database and query string as arguments.                                                              |
| executeScalar(connectionString, query)   | Executes an SQL script and returns the first field of the first record of the resulting set returned by the query. Accepts ODBC string of connection to the database and query string as arguments.  |
| openReader(connectionString, query)      | Executes an SQL script and returns a MosOdbcReader object to navigate the resulting data set returned by the query. Accepts ODBC string of connection to the database and query string as arguments. |


---

# 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.monokot.io/scripts/api/mosodbc.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.
