iOS Question B4i HandleJobAsync [SOLVED]

Discussion in 'iOS Questions' started by mmieher, Sep 9, 2018.

  1. mmieher

    mmieher Active Member Licensed User

    How do I do this in B4i? I want to wait for JRDC result before proceeding.

    Code:
    Sub GetRecord (id As Int)
       
    Dim req As DBRequestManager = CreateRequest
       
    Dim cmd As DBCommand = CreateCommand("select_animal"Array(id))
       
    Wait For (req.ExecuteQuery(cmd, 0Null)) JobDone(j As HttpJob)
       
    If j.Success Then
           req.HandleJobAsync(j, 
    "req")
           
    Wait For (req) req_Result(res As DBResult)
           
    'work with result
           req.PrintTable(res)
       
    Else
           
    Log("ERROR: " & j.ErrorMessage)
       
    End If
       j.Release
    End Sub
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Exactly like you do it in B4J or B4A. Which problem have you encountered?
     
  3. mmieher

    mmieher Active Member Licensed User

    In my b4i, and DBRequestManager does not have a method called HandleJobAsync.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

  5. mmieher

    mmieher Active Member Licensed User

    That did the trick. Thanks!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice