Android Question SQL database advice please

malcfreem

Member
Licensed User
Longtime User
Hi everyone.

We are developing an Android app which must connect to an SQL database on a server and use an SQLLite database internally. The SQLLite database works fine.

My initial plan was to use MySQL Server and .ASP scripts, but the database developer wants to use a later version of SQL database and ASP.NET.

My question is this...

Can B4A make a connection to ANY SQL database, even the latest ones?
Can I invoke ASP.NET scripts (and return JSON strings) to/from my app?

Thanks in anticipation of any help you can give
 
I did not have a RDC running. But, yes, it should work with all databases if there is an connector (jar) for this db avaiable.

Yes you can for sure invoke ASP.NET scripts if it is reachable through http. For this you just need httputils

Code: Copy
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
    Dim asp As HttpJob
    asp.Initialize("asptest",Me)
    asp.Download("http://www.mywebsite.com/myaspscript.asp")
End Sub

Sub JobDone(Job As HttpJob)
    ProgressDialogHide
    If Job.Success Then
        Dim res As String
        res = Job.GetString
        Log("JobName: "&Job.JobName&"/Resp:" & res)
        If Job.JobName = "asptest" Then
            Log("Response: "&res) ' here comes the jsonstring the asp returned...
        End If
    Else
        ToastMessageShow("Error: " & Job.ErrorMessage, True)
    End If
    Job.Release
End Sub
 
Upvote 0
Back
Top