1. Alexis Colon Lugo
  2. as SQLite DB Server
  3. 水, 5月 01 2019, 11:57 AM
  4.  メールで購読
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
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
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.
コメント
There are no comments made yet.
Alexis Colon Lugo 承諾済みの回答
ok
can you send me example link for how this can works using rest api

thanks
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
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.
コメント
There are no comments made yet.
Alexis Colon Lugo 承諾済みの回答
hi
if i use XOJO for ios can do rest api with valentina db
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
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)
添付ファイル
コメント
There are no comments made yet.
Alexis Colon Lugo 承諾済みの回答
Hi
how i install the rest server in my Raspberry PI to connect from XOJO iOS App
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
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
コメント
There are no comments made yet.
Alexis Colon Lugo 承諾済みの回答
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
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
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.
コメント
There are no comments made yet.
Alexis Colon Lugo 承諾済みの回答
ok
where is locate the folder for lic in the linux
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Here:
/opt/VServer/licenses
コメント
There are no comments made yet.
Alexis Colon Lugo 承諾済みの回答
thanks Sergey

how i now lic is working after copy file lic

thanks
コメント
There are no comments made yet.
Alexis Colon Lugo 承諾済みの回答
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 )
コメント
There are no comments made yet.
Alexis Colon Lugo 承諾済みの回答
Not yet i understand change dict.Value( "vendor" ) = inSQLVendor for valentina. what do you meen.
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Hello,

Pass "Valentina" as a value for inSQLVendor parameter.

It's a switch between two types of databases.
コメント
There are no comments made yet.
Alexis Colon Lugo 承諾済みの回答
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
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Hello Alexis,

Please add more details.
Did you implement Error method in your connection socket, like on screenshot?
添付ファイル
コメント
There are no comments made yet.
Alexis Colon Lugo 承諾済みの回答
yes
コメント
There are no comments made yet.
Alexis Colon Lugo 承諾済みの回答
i have error num -1004
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
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?
コメント
There are no comments made yet.
  • ページ :
  • 1
  • 2
  • 3


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

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories