Example: /SQL/CubeSQL Version iOS

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

/SQL/CubeSQL Version iOS


Required plugins for this example: MBS SQL Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /SQL/CubeSQL Version iOS

This example is the version from Mon, 21th Feb 2021.

Project "CubeSQL Version iOS.xojo_binary_project"
Class App Inherits MobileApplication
End Class
Class Screen1 Inherits MobileScreen
EventHandler Sub Opening() // use internal CubeSQL library Call InternalCubeSQLLibraryMBS.Use Dim con As New SQLConnectionMBS Try // connect to database // or use external DLL? // con.Option("CUBESQL.LIBS") = "/Users/cs/Desktop/libcubesql.dylib" con.Option("APPNAME") = "Xojo Test" con.Option("ConnectionTimeout") = "5" // 5 seconds timeout? 'con.Option("ConnectionEncryption") = "AES128" // or "AES192" or "AES256" con.Connect("localhost@mydatabase.sqlite","admin","admin",SQLConnectionMBS.kCubeSQLClient) // create table Dim cmd As New SQLCommandMBS cmd.Connection = con cmd.setCommandText("select sqlite_version()",cmd.kCommandTypeSQLStatement) cmd.Execute If cmd.FetchNext then MessageBox "Version: "+cmd.Field(1).asStringValue End If // Disconnect is optional // autodisconnect will ocur in destructor if needed con.Disconnect Catch r As RuntimeException MessageBox r.message // SAConnection::Rollback() // can also throw an exception // (if a network error for example), // we will be ready Try // on error rollback changes con.Rollback Catch rr As runtimeexception MessageBox rr.message End Try End Try End EventHandler
End Class
Class LaunchScreen Inherits iosView
End Class
End Project

See also:

The items on this page are in the following plugins: MBS SQL Plugin.


💬 Ask a question or report a problem