I have also found this hint, but i do not understand how to use it... On the first time i have only inserts, after that i have ~100 updates . It is possible to merge it together so far - is there a possibility to use batch-querys without arrays behind, like
sql.addnonqueryttobatch("insert into x(x) values(1)")
sql.addnonqueryttobatch("insert into x(x) values(2)")
sql.addnonqueryttobatch("insert into x(x) values(3)")
...
sql.addnonqueryttobatch("insert into x(x) values(99)")
sql.ExecNonQueryBatch
It looks like it works (with null as second parameter), but the speed did not increase. I use the following code:
Sub SQLE_Bulk(s As String)
sql1.AddNonQueryToBatch(s,Null)
End Sub
Sub SQLE_ExecuteBulk()
sql1.ExecNonQueryBatch("SQL1")
Log(">Run Query")
End Sub
Sub SQL1_NonQueryComplete (Success As Boolean)
Log(">Query Complete State: " & Success)
End Sub
I call SQLE_ExecuteBulk every 500 Rows and at the end. At the beginning of the sync i set p.KeepAlive(True), so the phone did not sleep. With this the sync works, but it needs the same time as before... After that it works, but the second error stays... ^ "Cannot convert: class anywheresoftware.b4a.objects.LabelWrapper, to: class anywheresoftware.b4a.objects.ButtonWrapper"
Edit: Found the second error - i have accidentally defined one of the labels as button in the global-section.
Edit 2: After some measuring i found out that the selects are the time-consuming parts... More keys in the tables helps a lot!