1. Alexis Colon Lugo
  2. as SQLite DB Server
  3. Wednesday, May 01 2019, 11:57 AM
  4.  Subscribe via email
Hi
i need to made one app for iPad but i need to sync with my local mini server with valentina sqlite server.

can this works or no

thanks
Comment
There are no comments made yet.
Sergey Pashkov Accepted Answer
Hello Alexis,

No automatic way to do such synchronisation.
Also, iV4CC (Objective-C/Swift iOS client) doesn't have SQLite support yet, we'll add it, of course, but currently only the REST API can be used.
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 1
Alexis Colon Lugo Accepted Answer
ok
can you send me example link for how this can works using rest api

thanks
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 2
Sergey Pashkov Accepted Answer
There are no examples for Swift.
A lot of generic examples of HTTP requests, the easiest I think is to use NSURLConnection.sendSynchronousRequest:
https://stackoverflow.com/questions/24016142/how-to-make-an-http-request-in-swift

Generic examples in Python:
http://valentina-db.com/docs/dokuwiki/v9/doku.php?id=valentina:articles:vserver_rest

Also, there are Xojo examples, they are all asynchronous.
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 3
Alexis Colon Lugo Accepted Answer
hi
if i use XOJO for ios can do rest api with valentina db
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 4
Sergey Pashkov Accepted Answer
Hi Alexis,

Yes, you can use iOS_vSQLite_Fast example, just replace "SQLite" with "Valentina" in Vendor parameter.

In example, this parameter is passed to DoSQLSocket Start method (on screenshot):
Start( inHost As Text, inSessionID As Text, inSQLURL As Text, inSQLVendor As Text, inSQLDatabase As Text, inQuery As Text)
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 5
Alexis Colon Lugo Accepted Answer
Hi
how i install the rest server in my Raspberry PI to connect from XOJO iOS App
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 6
Sergey Pashkov Accepted Answer
Hi Alexis,

What system do you use?
For Debian-like distribution it is:

wget http://valentina-db.com/download/release/lin_arm_32/vserver_armhf_32_9_lin.deb
sudo dpkg -i vserver_armhf_32_9_lin.deb
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 7
Alexis Colon Lugo Accepted Answer
yes Debian

now is install

How i set user a password for the server and if i can use VStudio from mac to connect to raspberry pi and edit the DB.

thanks
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 8
Sergey Pashkov Accepted Answer
The login/password by default is sa/sa, you can change it using the Server Admin in Valentina Studio (make sure to put a Linux license in the licenses folder of VServer - Server Admin uses a separate connection).

Yes, you can connect from macOS and edit DB like on the usual Linux server.
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 9
Alexis Colon Lugo Accepted Answer
ok
where is locate the folder for lic in the linux
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 10
Sergey Pashkov Accepted Answer
Here:
/opt/VServer/licenses
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 11
Alexis Colon Lugo Accepted Answer
thanks Sergey

how i now lic is working after copy file lic

thanks
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 12
Alexis Colon Lugo Accepted Answer
next question

RequestHeader( "Accept" ) = "application/json"
RequestHeader( "Content-Type" ) = "application/json"
RequestHeader( "Cookie" ) = inSessionID

Dim url As Text = inHost + inSQLURL

// Prepare data
Dim dict As New Dictionary
dict.Value( "vendor" ) = inSQLVendor <<<<<<<< for use sqlite VServer in raspberry pi how i config it. Like ip of pi server, user, password
dict.Value( "database" ) = inSQLDatabase
dict.Value( "query" ) = inQuery

Dim json As Text = Xojo.Data.GenerateJSON(dict)
Dim data As MemoryBlock = Xojo.Core.TextEncoding.UTF8.ConvertTextToData(json)

SetRequestContent(data, "application/json";)

// Send the POST request
Send( "POST", url )
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 13
Alexis Colon Lugo Accepted Answer
Not yet i understand change dict.Value( "vendor" ) = inSQLVendor for valentina. what do you meen.
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 14
Sergey Pashkov Accepted Answer
Hello,

Pass "Valentina" as a value for inSQLVendor parameter.

It's a switch between two types of databases.
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 15
Alexis Colon Lugo Accepted Answer
Hi
I try and i have msg see error who i now what error number or problem when try to connect to the server

thanks
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 16
Sergey Pashkov Accepted Answer
Hello Alexis,

Please add more details.
Did you implement Error method in your connection socket, like on screenshot?
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 17
Alexis Colon Lugo Accepted Answer
yes
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 18
Alexis Colon Lugo Accepted Answer
i have error num -1004
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 19
Sergey Pashkov Accepted Answer
In which method do you receive this error number? No Reason or Message texts in exception?
You can also check /opt/VServer/log - does the log have entries about connection?
Comment
There are no comments made yet.
  1. more than a month ago
  2. as SQLite DB Server
  3. # 20
  • Page :
  • 1
  • 2
  • 3


There are no replies made for this post yet.
However, you are not allowed to reply to this post.