# Cannot INSERT INTO MySQL with runPrepUpdate

**URL:** <https://forum.inductiveautomation.com/t/cannot-insert-into-mysql-with-runprepupdate/7410>\
**Category:** Ignition\
**Created:** [October 14, 2013, 6:31pm UTC](https://forum.inductiveautomation.com/t/cannot-insert-into-mysql-with-runprepupdate/7410 "2013-10-14T18:31:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![caritoel27](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/caritoel27/32/3430_2.png) [@caritoel27](https://forum.inductiveautomation.com/u/caritoel27)\
**Post date:** [October 14, 2013, 6:31pm UTC](https://forum.inductiveautomation.com/t/cannot-insert-into-mysql-with-runprepupdate/7410/1 "2013-10-14T18:31:52Z")

</div>

hi, I write to you because I am having a problem with the system.db.runPrepUpdate script :

system.db.runPrepUpdate(“INSERT INTO test\_cel(nombre,edad) VALUES(?,?)”,[‘Carolina’,31])

I don’t understand why it says me Invalid object name ‘test\_cel’, this table exists and the name is correct.

* * *

Traceback (most recent call last):

File “event:actionPerformed”, line 1, in

java.lang.Exception: java.lang.Exception: Error executing system.db.runPrepUpdate(INSERT INTO test\_cel(nombre,edad) VALUES(?,?), [Carolina, 27], , , false, false)

```
caused by Exception: Error executing system.db.runPrepUpdate(INSERT INTO test_cel(nombre,edad) VALUES(?,?), [Carolina, 27], , , false, false)
caused by GatewayException: SQL error for "INSERT INTO test_cel(nombre,edad) VALUES(?,?)": Invalid object name 'test_cel'.
caused by SQLServerException: Invalid object name 'test_cel'.

```

## Ignition v7.6.3 (b2013090513) Java: Oracle Corporation 1.7.0\_03

Please help me to give a solution to this.

Thanks and Regards

Carito ☹

---

<div class="post-metadata">

**Author:** ![RRRancher](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@RRRancher](https://forum.inductiveautomation.com/u/RRRancher)\
**Post date:** [October 14, 2013, 6:56pm UTC](https://forum.inductiveautomation.com/t/cannot-insert-into-mysql-with-runprepupdate/7410/2 "2013-10-14T18:56:40Z")

</div>

Is that table in the default database for the project? If not, you will have to specify the database name in the system.db.runPrepUpdate command.

---

<div class="post-metadata">

**Author:** ![caritoel27](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/caritoel27/32/3430_2.png) [@caritoel27](https://forum.inductiveautomation.com/u/caritoel27)\
**Post date:** [October 14, 2013, 7:04pm UTC](https://forum.inductiveautomation.com/t/cannot-insert-into-mysql-with-runprepupdate/7410/3 "2013-10-14T19:04:46Z")

</div>

Thank you very much, I forget it. It works Now!!

Regards

Carito 😃

---

<div class="post-metadata">

**Author:** ![RRRancher](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@RRRancher](https://forum.inductiveautomation.com/u/RRRancher)\
**Post date:** [October 14, 2013, 7:08pm UTC](https://forum.inductiveautomation.com/t/cannot-insert-into-mysql-with-runprepupdate/7410/4 "2013-10-14T19:08:43Z")

</div>

Glad I could help you get it going, Carito. I forget simple things like that myself.
