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?
KK