Error running system.db.runPrepQuery with spaces in values

Thank you all for your help and tips,

@lrose , I’m doing it this way because it is what you showed me in a previous post: http://forum.inductiveautomation.com/t/use-system-db-runupdatequery-with-variable-value-counts/42658/3?u=rusty
I don’t know how to use that command otherwise with a variable number of arguments.

@bkarabinchak.psi The only reason I’m converting it to a string is because I can’t get the values to go in the command without erroring out unles each value is enclosed in apostrophes. The columns in the datatable are set as integers, so the values end up being integers there.