Android Question Problem executing batch jRDC query

gigi0ne

Member
Licensed User
Longtime User
Hello everybody

small problem with executing a non-select query with jDRC2

The code is this, the update on one table and the insert on the other are executed correctly
(and the RDCConnector does not give errors, on the contrary it says that the batch has been
executed correctly) but the routine never returns to the job done .. remains there waiting ..

What could it be?
Thank's


B4X:
Sub ChangeQty
    ProgressDialogShow("ATTENDI")
    Dim cmdList As List
    cmdList.Initialize
    Dim cmd As DBCommand = Utils.CreateCommand("set_gestione", Array(Main.act_variant))
    cmdList.Add(cmd)
    Dim cmd As DBCommand = Utils.CreateCommand("set_gestione_linee", Array(Main.act_variant, vendita.Text))
    cmdList.Add(cmd)
    Dim req As DBRequestManager = Utils.CreateRequest
    Wait For(req.ExecuteBatch(cmdList, Null)) JobDone(j As HttpJob)
    If j.Success Then
        Log("Inserted successfully!")
        ProgressDialogHide
    End If
    j.Release
End Sub
 

OliverA

Expert
Licensed User
Longtime User
remains there waiting ..
What remains waiting most likely (guess) is the Progress Dialog box. This does not mean the Wait For did not complete. You are not testing / checking for the case where j.Success could be False.
Try
B4X:
If j.Success Then 
  Log("Inserted successfully!")
Else
  Log("Something went wrong!!!")
  Log(j.ErrorMessage)
End If
ProgressDialogHide
and see what is logged
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…