#51 2013-07-13 20:54:00

Tom Duncan
Member
Registered: 2012-02-07
Posts: 49

Re: Use Sqlite in a client/server concurrent mode

Just did a Google on live bindings.
Sounds like a new Delphi thing.
I am still using Delphi 7

Tom

Offline

#52 2013-07-13 20:54:49

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Use Sqlite in a client/server concurrent mode

Check the sample about VCL datasets and mORMot.

Offline

#53 2013-07-13 22:09:28

Tom Duncan
Member
Registered: 2012-02-07
Posts: 49

Re: Use Sqlite in a client/server concurrent mode

Just testing the Sample 16.
Have Sqlite3 as the engine.
Database as test.db3 (which is in the same16 folder)
server in localhost/root:888 (also tested localhost:888)
user and password blank

Then after Open error in server an error in the Database handle.
Where do I need to have the sqlite database.

Tom

Offline

#54 2013-07-13 22:21:03

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Use Sqlite in a client/server concurrent mode

Use the DB from TestSqlite3 regression tests.

Offline

#55 2013-07-13 22:38:54

Tom Duncan
Member
Registered: 2012-02-07
Posts: 49

Re: Use Sqlite in a client/server concurrent mode

Was using that one.
Put in user and password as admin/admin

Offline

#56 2013-07-13 22:55:53

Tom Duncan
Member
Registered: 2012-02-07
Posts: 49

Re: Use Sqlite in a client/server concurrent mode

Had a look at the code for converting the old Volga database to a Sqlit3 one.
Used Sql Create table etc.
If the Field was a memo then say Text.
Then in filling the table used the Variant for each field.

Tom

Offline

#57 2013-07-14 03:13:23

Tom Duncan
Member
Registered: 2012-02-07
Posts: 49

Re: Use Sqlite in a client/server concurrent mode

1. What values do you use with sqlite as the database in Sample 16.

2. Also had a look at Sample17 and cannot find people.json

    Had a look on your web site in the files area as well.

Tom

Offline

#58 2013-07-14 06:49:55

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Use Sqlite in a client/server concurrent mode

Please compile and run the regression tests first, to create some files.
This is TestSQL3.dpr.
Enable http.sys for the given port with TestSQL3Register.dpr.

1. Some typical values, extracted from Project16Client.settings:

{
	"Engine": "rseSQlite3",
	"ServerName": "d:\\dev\\lib\\sqlite3\\exe\\test.db3",
	"DatabaseName": "",
	"UserID": "",
	"PassWord": ""
}

2. The sample from People.json which is created by TestSQL3.exe.

Offline

#59 2013-07-14 07:26:29

Tom Duncan
Member
Registered: 2012-02-07
Posts: 49

Re: Use Sqlite in a client/server concurrent mode

Wonderful Thanks.
Now for my last silly question.

With Say Project 16 how would I modify a value then send it back to the test3.db3?

Tom

Offline

#60 2013-07-14 07:42:06

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Use Sqlite in a client/server concurrent mode

It is read only, with the current implementation.

For writing, you will have to use the ORM classes, like Update/Delete/Insert.
It is not implemented at TDataSet level by now.

Offline

#61 2013-07-14 07:53:12

Tom Duncan
Member
Registered: 2012-02-07
Posts: 49

Re: Use Sqlite in a client/server concurrent mode

Will have a look later.
Pity our timezone is so far apart. Just getting ready for dinner in Australia now.
Would this make it difficult to send update information from my android application.
I think it uses an SQL update etc function.

Tom

Offline

#62 2013-07-14 09:45:23

Tom Duncan
Member
Registered: 2012-02-07
Posts: 49

Re: Use Sqlite in a client/server concurrent mode

So...
Is it worth me continuing with this idea.
I do need to be able to send and receive data with SQL.

Tom

Offline

#63 2013-07-14 18:10:15

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Use Sqlite in a client/server concurrent mode

Do not use SQL, but RESTful commands, i.e. POST or PUT with the corresponding JSON content.

See the documentation about the RESTful format used, and the corresponding sample .

Offline

Board footer

Powered by FluxBB