Hi,
i use the follew code:
With DoEvents it works fine, with Sleep(0) not (Exit Loop after first Run).
Is there an solution works with Sleep(0)
i use the follew code:
B4X:
Sub Syncroniesierung(qPhat As String, qDatei As String, zPhat As String, zDatei As String)
Dim qSQL, zSQL As SQL
Dim count As Long
Dim query As String
qListe.Initialize
zListe.Initialize
qSQL.Initialize(qPhat,qDatei,False)
zSQL.Initialize(zPhat,zDatei,False)
qListe=DBUtils.ExecuteMemoryTable(qSQL,"Select * FROM Log",Null,0)
For c=0 To qListe.Size-1
Dim varStr() As String =qListe.Get(c)
Dim laenge As Int = varStr(0).Length
If laenge >4 Then
query="SELECT COUNT(*) FROM log WHERE id ='" & varStr(0) & "'"
End If
count = zSQL.ExecQuerySingleResult(query)
If count<=0 Then
zListe.Add(qListe.Get(c))
End If
DoEvents
'Sleep(0)
Next
........
With DoEvents it works fine, with Sleep(0) not (Exit Loop after first Run).
Is there an solution works with Sleep(0)