# Supplying int to system.db.runPrepUpdate converts it into a list of binary bits

**URL:** <https://forum.inductiveautomation.com/t/supplying-int-to-system-db-runprepupdate-converts-it-into-a-list-of-binary-bits/92006>\
**Category:** Ignition\
**Created:** [June 18, 2024, 11:45am UTC](https://forum.inductiveautomation.com/t/supplying-int-to-system-db-runprepupdate-converts-it-into-a-list-of-binary-bits/92006 "2024-06-18T11:45:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 18, 2024, 11:45am UTC](https://forum.inductiveautomation.com/t/supplying-int-to-system-db-runprepupdate-converts-it-into-a-list-of-binary-bits/92006/1 "2024-06-18T11:45:50Z")

</div>

v8.1.41

```python
v = 50
system.db.runPrepUpdate('INSERT INTO test (id) VALUES (?)', v)

```

Results in error:  
` java.lang.Exception: java.lang.Exception: Error executing system.db.runPrepUpdate(INSERT INTO test (id) VALUES (?), [0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], , , false, false)`

`Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The index 2 is out of range.`

Where that list of args reversed (b0000 0000 0000 0000 0000 0000 0011 0010) is 50 in decimal... What's going on?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 18, 2024, 11:52am UTC](https://forum.inductiveautomation.com/t/supplying-int-to-system-db-runprepupdate-converts-it-into-a-list-of-binary-bits/92006/2 "2024-06-18T11:52:26Z")

</div>

`v` should be `[v]`. You didn't supply a **list** of parameters.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 18, 2024, 11:53am UTC](https://forum.inductiveautomation.com/t/supplying-int-to-system-db-runprepupdate-converts-it-into-a-list-of-binary-bits/92006/3 "2024-06-18T11:53:36Z")

</div>

Derrrrrrr, of course, thanks 🤦‍♂️ Shouldn't be working at 9:30pm obviously
