Android Question progress dialog not showing:

manuaaa

Member
Licensed User
Longtime User
Hi,
While running the code progress bar is not showing.... please help


progress dialog not showing:
SQL1.ExecNonQuery("delete from TAB_TEAM ")
    L=  a.Query("select * from FSH WHERE  LC = "& empid &"") 'LC = " & empid & " ' changed on 18th july
    ProgressDialogShow("Wait......")
    For i = 1 To L.Size -1
        Dim MyRecord As String=L.Get(i)
        MyRecord=MyRecord.Replace("[","").Replace("]","")     'get rid of brackets in each record
        Dim strRecArray() As String
        strRecArray=Regex.Split(",",MyRecord)
        SQL1.ExecNonQuery2("INSERT INTO TAB_TEAM VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", strRecArray)
    Next
 

DonManfred

Expert
Licensed User
Longtime User
Are you calling it from a Activity or from a Service?
 
Upvote 0

jahswant

Well-Known Member
Licensed User
Longtime User
Your code is not optimized. You should use AddNonQueryToBatch.


B4X:
For i = 1 To 1000
  sql.AddNonQueryToBatch("INSERT INTO table1 VALUES (?)", Array(Rnd(0, 100000)))
Next
Dim SenderFilter As Object = sql.ExecNonQueryBatch("SQL")
Wait For (SenderFilter) SQL_NonQueryComplete (Success As Boolean)
Log("NonQuery: " & Success)
It’s more faster and your progress dialog will show up.
 
Upvote 0
Top