Connecting to a CubeSQL Server

Is possible on iOs?

Many thanks!

[quote=156253:@Sergio Tamborini]Is possible on iOs?

Many thanks![/quote]
Plugins are not supported (yet), so the common way when using a desktop app is not possible.

However, there may be other options:

  • you can write your own RESTful api in order to access a CubeSQLServer, for instance with Xojo Web Edition
  • CubeSQLServer supports JSON protocol. Maybe you can make use of it (I haven’t tried)

From the ReadMe.pdf which comes with CubeSQLServer:

In order to try to supports as much heterogeneous clients as possible cubeSQL fully
supports the JSON open standard protocol. JSON is a lightwave text based protocol and
is built-into any major language (like PHP, Ruby, LiveCode and so on). In this version only
JSON over TCP/IP is supported, next version will also support JSON over HTTP.

For a complete and working JSON implementation we strongly suggest you to take a
look at the cubeSQLServer.php class.

For basic operations are supported by our JSON implementation, connect, execute,
select and disconnect.

This is the first command that is required in order to open a JSON connection with the
s e r v e r . u s e r n ame i s S H A 1 * ( r a n d p o o l + u s e r n ame ) , p a s swo r d i s
BASE64(SHA1(SHA1(password))). randpool is any random integer array.

  • is the string concatenation symbol).
    *SHA1 for username is in HEX mode

In case of error any JSON command returns:
“errorMsg”:“An error occurred…”

In case of a successful execution errorCode is set to 0.

This command executes an sql statement on the server:
“username”:“UPDATE foo SET col1=‘test’;”


This command executes an sql query on the server and returns a cursor using the JSON
“username”:“SELECT * FROM foo;”

This command close current connection with the server:

And Xojo for iOS supports tcp and JSON$tcpsocket$data

Many thanks Osswald. It’s a good way to do this…

Many thanks Osswald. It’s a good way to do this…