B4J Question How To create Auto Number Using B4j

Discussion in 'B4J Questions' started by Makumbi, Jun 25, 2019.

  1. Makumbi

    Makumbi Active Member Licensed User

    Please help me how i wanted to create an auto number for my ID colum in my Table AndroidUserdata but iam failing to implement it

    Dim jtrb As HttpJob
    "", Me)
    "http://kccug.com/KabojjaApp/HandlerVBLoadclass.ashx",Array As String("Action""jtr""customerId",ResultSet1.GetString2(0)))
    Wait For (jtrb) JobDone(jtrb As HttpJob)
    If jtrb.Success Then
    End If
    Dim jt As HttpJob
    "", Me)
    'j.GetRequest.Timeout = 1000 ' 10 seconds2
            Wait For (jt) JobDone(jt As HttpJob)
    If jt.Success Then ' if job is success (http status code 200)
                Dim RetVal As String
                RetVal = jt.GetString
    Dim jp As JSONParser
    'Log(jp) ' will pr
                Dim quotes As List = jp.NextArray
    For Each quot As Map In quotes
    Log("Phone: " & quot.Get("Phone"))
    Log("Type: " & quot.Get("Type"))
    Log("Class: " & quot.Get("class"))
    Log("Stream: " & quot.Get("Stream"))
    Log("Names: " & quot.Get("Names"))
    Dim rst As ResultSet = SQL1.ExecQuery("SELECT DISTINCT ID FROM AndroidUserdata;" )
    '    Do While rs.NextRow
                    Dim row(1As Object
    1) = rst.GetString("ID")'
                        Dim NewID As Int
                        NewID =row(
    1) +1
    "INSERT INTO AndroidUserdata VALUES(?, ?, ?,?, ?,?)"Array As Object(quot.Get("Phone"), quot.Get("Names"), quot.Get("class") ,quot.Get("Stream"),quot.Get("Type"),NewID))


            End If
  2. inakigarm

    inakigarm Well-Known Member Licensed User

    Last edited: Jun 25, 2019
    DonManfred likes this.
  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