Problem with Script after update

I have just updated a project from V7.7.4 to V7.8.3 and have found that one of the scripts will not function correctly.
Basically I am taking data from a Dataset and entering it into a SQL table.
Under V7.7.4 the script worked correctly, but since the upgrade it now only enters the data from the first row of the dataset, but multiple times.
The part of the script that does this is as follow:-

#Insert details into batchChems table Ds_chems = event.source.parent.Ds_chems chemRowCount = (Ds_chems.rowCount) for x in range (chemRowCount): chemSection = event.source.parent.Fr_chemsSection chemAddOrder = event.source.parent.Fr_chemsAddOrder chemID = event.source.parent.Fr_chemsID chemQty = event.source.parent.Fr_chemsQty chemUOM = event.source.parent.Fr_chemsUOM chemBatchQty = event.source.parent.Fr_chemsBatchQty chemActualQty = 0.0 chemCompleted = 'False' chemDye = "chem" system.db.runPrepUpdate("INSERT INTO batchChems (batchID, section, additionOrder, chemID, qty, uom, batchQty, actualQty, completed, chemDye) VALUES (?,?,?,?,?,?,?,?,?,?)", [batchID, chemSection, chemAddOrder, chemID, chemQty,chemUOM, chemBatchQty, chemActualQty, chemCompleted, chemDye]) Ds_chems = event.source.parent.Ds_chems chemRow = 0 event.source.parent.Ds_chems = system.dataset.deleteRow(Ds_chems, chemRow)

Any ideas as to what is going on?


The assignment with the deleteRow() isn’t propagating inside your event. That it would in 7.7.4 is a flaw that makes event operations much more susceptible to infinite loops.
You’ll have to use Ds_chems.getValueAt(x, ‘columnName’) inside your loop to retrieve the values. It’ll be much faster than using bindings to retrieve the values, too.