Your string changes constantly. Each call to AddNonQueryBatch has different public_id and public_device_id. You see, the string is created with the different Id's before it is passed to the underlying routine. The routine does not get the rs.GetString methods, rather those methods are executed and a new string created before the new string is passed to the underlying routine of AddNonQueryBatch. Therefore, each call to AddNonQueryBatch has a different string. I, on the other hand, use the same string. Nothing changes, only the parameters that are passed as a different argument.
Wish:
https://www.b4x.com/android/forum/t...nt-addnonquery2args-execnonquery2batch.92290/
BTW: Funny how both of us were thinking about the underlying code of AddNonQueryBatch.
Note 2: And that's why code optimization at times may be done in the wrong place. SQL calls are very expensive, so the small changes done here have a minuscule impact in comparison, and therefore a may be considered a nit-pick (or waste of time).