1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-09 07:14:16 +02:00

44 lines
1.3 KiB
Plaintext
Raw Normal View History

2025-02-12 19:33:53 +03:00
---
sidebar_position: 4
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Execute SQL query
Executes an arbitrary SQL query
`Function ExecuteSQLQuery(Val QueryText, Val Parameters = "", Val ForceResult = False, Val Connection = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| QueryText | --sql | String | ✔ | Database query text |
| Parameters | --params | Array Of Arbitrary | ✖ | Array of positional parameters of the request |
| ForceResult | --force | Boolean | ✖ | Includes an attempt to retrieve the result, even for nonSELECT queries |
| Connection | --dbc | String, Arbitrary | ✖ | Connection or connection string |
Returns: Structure Of KeyAndValue - Result of query execution
<br/>
:::tip
Available parameter types: String, Number, Date, Boolean, BinaryData. Binary data can also be passed as a `{'blob':File path}` structure. Binary data (BLOB) values are returned as `{'blob':Base64 string}`
Without specifying the `ForcifyResult` flag, result data is returned only for queries beginning with `SELECT` keyword For other queries, `result:true` or `false` with error text is returned
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
```