iOS Question [SOLVED]Conect Mysql BD

Discussion in 'iOS Questions' started by Jorge Sanz, Jan 16, 2018.

  1. Jorge Sanz

    Jorge Sanz Member Licensed User

    Hello,

    I am starting to program an app that I have in B4A for IOS.
    I can not connect to my BD Mysql.
    In B4a I do it using the following code:

    Code:
    .
    .
    .

    ExecuteRemoteQuery(
    "Select * From Usuarios'","Usuarios")
    .
    .
    .


    Sub ExecuteRemoteQuery(Query As String, JobName As String)
        
    Dim job As HttpJob
        job.Initialize(JobName, Me)
        job.PostString(
    "http://www.miweb.com/usuarios.php", Query)
        
        
    End Sub


    Sub JobDone(Job As HttpJob)
        
    ProgressDialogHide
        
    If Job.Success Then
        
            
    Dim res As String
            res = Job.GetString
            
    Log("Response from server: " & res)
            
    Dim parser As JSONParser
            parser.Initialize(res)
            
    Select Job.JobName
                
    Case "Usuarios"
                    
                    
    Dim res As String
                    
    Dim rutadescarga,img As String
                    res = Job.GetString
                    
    Log("Response from server: " & res)
                    
    Dim parser As JSONParser
                    parser.Initialize(res)
                    COUNTRIES = parser.NextArray 
    'returns a list with maps
                    result.Initialize
                    
                    
    For i = 0 To COUNTRIES.Size - 1
                        m = COUNTRIES.Get(i)
                        
    log(m.Get("Nombre"))
                    
    Next
    end select
    end sub
     
  2. MarcoRome

    MarcoRome Expert Licensed User

    Do you have this line

    if yes, write:

    Your site isnt https
     
  3. Jorge Sanz

    Jorge Sanz Member Licensed User

    I have done it but now the application is closed. I guess it gives an error.
    The access data are the same as I use with in B4a
     
  4. Jorge Sanz

    Jorge Sanz Member Licensed User

    thank you, it was that and my sentence sql
     
  5. MarcoRome

    MarcoRome Expert Licensed User

     
  6. Jorge Sanz

    Jorge Sanz 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