# Inserting text with $ in runPrepUpdate() returns error

**URL:** <https://forum.inductiveautomation.com/t/inserting-text-with-in-runprepupdate-returns-error/3911>\
**Category:** Ignition\
**Created:** [January 25, 2012, 5:53pm UTC](https://forum.inductiveautomation.com/t/inserting-text-with-in-runprepupdate-returns-error/3911 "2012-01-25T17:53:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ron](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@Ron](https://forum.inductiveautomation.com/u/Ron)\
**Post date:** [January 25, 2012, 5:53pm UTC](https://forum.inductiveautomation.com/t/inserting-text-with-in-runprepupdate-returns-error/3911/1 "2012-01-25T17:53:36Z")

</div>

I am running the system.db.runPrepUpdate statement with the getKey=1 option and get an error if there is a $ in the text field I am writting to a varchar in the db. Here is the actual error details:

[quote]Traceback (innermost last):

File “event:actionPerformed”, line 350, in ?

java.lang.Exception: Error executing system.db.runPrepUpdate(Insert into dbo.tblComplaint (FirstName,LastName,MailingAddress,City,State,ZipCode,Phone,EMail,SalesContact,ConsumerStatement,ComplaintType,Consumer,VJC,Research,ResponseText,PRKYN,DateReceived,CheckAmt,PackageID,PackageType,PackageTypeDetail,PurchaseLocation,Injury,TreatmentRequired,ConsumerSatisified,BreweryAction,OI) Values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?), [Ron, Mayfield, 1075 East 20th St., Chico, CA, , , , , This is a test as the $ seems to be causing issues., Quality, 1, , , , No, 01/25/2012, 0.0, , Bottle, , , No, No, Yes, , No], , , true)

Caused by: com.inductiveautomation.ignition.client.gateway\_interface.GatewayException: Unable to read response from Gateway.

Caused by: org.xml.sax.SAXParseException: The element type “ResponseWrapper” must be terminated by the matching end-tag “”.

java.lang.Exception: java.lang.Exception: Error executing system.db.runPrepUpdate(Insert into dbo.tblComplaint (FirstName,LastName,MailingAddress,City,State,ZipCode,Phone,EMail,SalesContact,ConsumerStatement,ComplaintType,Consumer,VJC,Research,ResponseText,PRKYN,DateReceived,CheckAmt,PackageID,PackageType,PackageTypeDetail,PurchaseLocation,Injury,TreatmentRequired,ConsumerSatisified,BreweryAction,OI) Values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?), [Ron, Mayfield, 1075 East 20th St., Chico, CA, , , , , This is a test as the $ seems to be causing issues., Quality, 1, , , , No, 01/25/2012, 0.0, , Bottle, , , No, No, Yes, , No], , , true)

Ignition v7.3.3 (b570)  
Java: Sun Microsystems Inc. 1.6.0\_30  
[/quote]

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [January 25, 2012, 7:45pm UTC](https://forum.inductiveautomation.com/t/inserting-text-with-in-runprepupdate-returns-error/3911/2 "2012-01-25T19:45:29Z")

</div>

The dollar sign is reserved for use in regular expression evaluation in Python, Java, and I think MySQL. A veritable trifecta!

Unless there’s a reason you really, really need a dollar sign in the field, I’d recommend avoiding it altogether…

Any chance we could that snippet of the script to look over, to be sure I’m not just whistling?

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [February 1, 2012, 12:14am UTC](https://forum.inductiveautomation.com/t/inserting-text-with-in-runprepupdate-returns-error/3911/3 "2012-02-01T00:14:17Z")

</div>

This has been replicated and will be fixed in the next 7.3 version.
