iOS Question [SOLVED]Conect Mysql BD

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:

B4X:
.
.
.

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
 

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
 
Upvote 0

Similar Threads

Top