data sending to server in loop

sasidhar

Active Member
Licensed User
Longtime User
Hi all,

I am sending data to server from mobile local db thru HttpUtils2 utils. Please find the code below.

I am unable to send my complete data in localdb as the loop is running fast and last record is updating to server. If i give some delay n between then few records updating else only last record sending to server.

how to handle this.. trstr has complete URL info with required params to send to server.
how to keep delay in loop to validate one by one data transfer to server.

tCursor2 = sql1.ExecQuery("SELECT * FROM Transaction_Table")
If tCursor2.RowCount>0 Then
For i=0 To tCursor2.RowCount-1
tCursor2.Position = i
trstr=(tCursor2.GetString("Trans_str")) ' Note:Field names Case sensitive
htjob2.PostString(trstr,"")

ToastMessageShow("Data Posting InProgress..Don't Exit from Application" & i & " of " & tCursor2.RowCount,True)
Next
End If
tCursor2.Close
 
Top