Recently I was able to connect from an iOS app to CubeSQLServer by using recent MBS plugins.
But now, it just doesn’t want to work anymore. The same codesnippet works as expected when using it from a macOS app (code in Windows1 open event handler).
When I put the same snippet into the Screen1.Opening event handler of an iOS app, it fails to connect. I do not see any detailed information, when stepping through code in debugger.
Do you have any idea why this is no longer working for me?
Sub Opening() Handles Opening
// use internal CubeSQL library
Call InternalCubeSQLLibraryMBS.Use
Dim db As New SQLDatabaseMBS
db.Option("APPNAME") = "Xojo Test"
db.Option("ConnectionTimeout") = "5" // 5 seconds timeout?
db.Option("ConnectionEncryption") = "AES256" // or "AES192" or "AES256"
db.DatabaseName = "cubesql:b790.ch@test"
db.UserName = "tester"
db.Password = "testpassword"
If db.Connect Then
Dim r As RowSet = db.SelectSQL("select sqlite_version()")
If r = Nil Or r.AfterLastRow Then
TextArea1.Text = "Failed to query version."
Else
TextArea1.Text = "Version: "+r.ColumnAt(0).StringValue
End If
Else
TextArea1.Text = "Could not connect to database"
End If
End Sub