Android Question Results information from the JRDC2 consult in B4A

Discussion in 'Android Questions' started by manuelsalazar, Aug 13, 2019 at 5:20 PM.

  1. manuelsalazar

    manuelsalazar Member Licensed User

    I have the results information from the JRDC2 consult in B4A, is there any simple command to send it to a ListView/Webview/CustomView object ?????


    Thanks in advanced.
    Manuel
     
  2. Johan Hormaza

    Johan Hormaza Active Member Licensed User

    Code:
    Dim req As DBRequestManager = CreateRequest
        
    Dim cmd As DBCommand = CreateCommand("Select_dataBase_SQL",Array())
        
    Wait For (req.ExecuteQuery(cmd,0,Null)) JobDone(j As HttpJob)
        
    If j.Success Then
            req.HandleJobAsync(j, 
    "req")
            
    Wait For (req) req_Result(res As DBResult)
            
    For a = 0 To res.Rows.Size - 1
                
    Dim fila() As Object = res.Rows.Get(a)
                
    Dim p As B4XView = xui.CreatePanel("")
                
    Dim height As Int = 140dip
                
    If GetDeviceLayoutValues.ApproximateScreenSize < 4.5 Then height = 110dip
                p.SetLayoutAnimated(
    000, CLVSubMenu.AsView.Width, height)
                p.LoadLayout(
    "CardSubmenu")
                lblTituloSub.Text = fila(res.Columns.GetValueAt(
    1))
                lblDetalles1.Text = fila(res.Columns.GetValueAt(
    2))
                imgSubM.Bitmap =  CreateRequest.BytesToImage(fila(res.Columns.GetValueAt(
    0))).Resize(imgSubM.Width,imgSubM.Height,True)
                CLVSubMenu.Add(p,fila(res.Columns.GetValueAt(
    1)))
            
    Next
        
    End If
        j.Release
    Code:
    Sub CreateRequest As DBRequestManager
       
    Dim req As DBRequestManager
       req.Initialize(Me,rdcLink)
       
    Return req
    End Sub

    Sub CreateCommand(Name As String, Parameters() As Object) As DBCommand
       
    Dim cmd As DBCommand
       cmd.Initialize
       cmd.Name = Name
       
    If Parameters <> Null Then cmd.Parameters = Parameters
       
    Return cmd
    End Sub
     
    Erel and José J. Aguilar like this.
  3. Erel

    Erel Administrator Staff Member Licensed User

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