SQL runPrepUpdate argument max limit

Hi,

I have been successfully using the system.db.runPrepUpdate function all over the place for UPDATE and INSERT queries.
I have been getting errors when trying to a very large INSERT using this function though, a sample size of 143, which means it has 143 x 3 args to pass through.
Here is the error thrown up on the gateway logs:

([default]Gisborne01/ProdSystems/QATests/QAT_ProofTest/TestNow, valueChanged) Error executing tag event script: Traceback (most recent call last): File "<tagevent:valueChanged>", line 105, in valueChanged at com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities.error(AbstractDBUtilities.java:357) at com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities.runPrepUpdate(AbstractDBUtilities.java:255) at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) java.lang.Exception: java.lang.Exception: Error executing system.db.runPrepUpdate(INSERT INTO QAProofTestData (Test_ID,SerialNum,Stiffness) VALUES (?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?), [1883, 1000001853, 13.599055290222168, 1883, 1000001854, 14.676336288452148, 1883, 1000001855, 14.189558029174805, 1883, 1000001856, 13.22437572479248, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0, 1883, 0, 0.0], ProdTracking, , false, false)

I have tested the exact same script but using a sample size of 4, which works fine.
I’m wondering if there is an upper limit to how many arguments can be passed into a prepared statement like this.

Thanks

I believe this might be failing a Foreign Key constraint in my QAT_ProofTestData table, where the SerialNum column cannot be 0.