I presume a transaction routine is still beneficial in an asynch. non-query. Is the placement I have introduced below correct?
EDIT: According to Erel, no need for transaction routine as the command creates its own transaction. It will not help speed up the process. So, I remarked the lines shown above.
B4X:
'SQL1.BeginTransaction
'Try
For i = 1 To 10000
sql1.AddNonQueryToBatch("INSERT INTO table1 VALUES (?)", Array As Object(Rnd(0, 100000)))
Next
sql1.ExecNonQueryBatch("SQL")
'SQL1.TransactionSuccessful
'Catch
'Log(LastException.Message)
'End Try
'SQL1.EndTransaction
EDIT: According to Erel, no need for transaction routine as the command creates its own transaction. It will not help speed up the process. So, I remarked the lines shown above.
Last edited: