Dim count,limit,offset As Int
count = db.ExecQuerySingleResult($"select count(*) from a"$)
limit = 100
offset = 0
Do While offset < count
db.ExecNonQuery( _
$"UPDATE a SET amt= (update sum values here)
WHERE condition and
ROWID IN (SELECT ROWID FROM a WHERE LIMIT ${offset},${limit})"$)
Log("LIMIT : " & limit & " OFFSET : " & offset & " Time : " & DateTime.Time(DateTime.Now))
show_progressbar_new(offset / count * 100)
offset = offset + limit
Loop
show_progressbar_new is running but not showing Progress status of B4XProgressBar1.Progress
If I put sleep(0) in loop then progressbar progress start showing but function completed instantly without finish whole loop