I have a For Next loop that updates each record in a table given a certain condition but the circularprogressbar won't update when the value is updated in the loop. The CircularProgressBar also won't show visible even if I make it visible in code before I start the For Next Loop. I also have this issue with sweetalertdialog. Please let me know what I am doing wrong.
B4X:
Starter.sqlBN.BeginTransaction
Try
For i = 0 To Cursor1.RowCount - 1
Cursor1.Position = i
Query = "UPDATE Table Set STATUS = ? WHERE AssetNo = " & Cursor1.GetInt("ASSETNO")
Starter.sqlBN.ExecNonQuery2(Query, Array As String("T1")
cpbIB.Value = I 'CustomProgressBar value
Next
Starter.sqlBN.TransactionSuccessful
Catch
Log(LastException.Message)
End Try
Starter.sqlBN.EndTransaction
Cursor1.Close