Android Question Problem sending to server

Roneys

New Member
Good morning all.
I have a little problem, and I don't see where it is. In a local database, I have 3 records. When I send these 3 records to my local server by making a loop, I only get 2 of them. The last one is never saved. Here is a copy of my code.
Thanks for any help

Sending command:
        Dim dHour As String
        DateTime.SetTimeZone(1)
        DateTime.TimeFormat="HH:mm"
        DateTime.ListenToExternalTimeChanges
        dHour = DateTime.time(DateTime.Now)
        
        Dim InsertNewCommande As HttpJob
        Dim Cur_comm As Cursor
        Dim row_comm As Int
        Dim numcom, dateCom, nomProdCom As String
        Dim typeCom, idProdCom, statut As Int
        Dim prixProdCom As Float
        
        Cur_comm = SQL1.ExecQuery("SELECT * FROM localCommande") '3 records in database
        row_comm = Cur_comm.RowCount
        Cur_comm.Position = 0
        
        For i =0 To row_comm -1
            
            Cur_comm.Position = i
        
            numcom = Cur_comm.GetString("com_numComande")
            dateCom = Cur_comm.GetString("com_dateCommande")
            typeCom = Cur_comm.GetInt("com_type")
            idProdCom = Cur_comm.GetInt("com_id_produit")
            nomProdCom = Cur_comm.GetString("com_nom_produit")
            prixProdCom = Cur_comm.GetLong("com_prix_produit")
            statut = 0
            
            Dim prix2 As String = prixProdCom
            InsertNewCommande.Initialize("", Me)
            InsertNewCommande.download2("http://" & ServerIP & "/www/PizzaTime/mobile.php", Array As String ("action", "InsertNewCommande", "numCom", numcom, "dateCom", dateCom, "typeCom", typeCom, "idProdCom", idProdCom, "nomProdCom", nomProdCom, "prixProdCom", prix2, "statut", statut, "webUserCom", id_webUser, "heure",dHour))
            
            Wait For (InsertNewCommande) JobDone(InsertNewCommande As HttpJob)
            If InsertNewCommande.Success Then
                Log(InsertNewCommande.GetString)
            End If
            InsertNewCommande.Release
        
        Next
 
Top