#1 2015-07-05 22:32:28

RaelB
Member
Registered: 2010-08-04
Posts: 49

Understanding sample 02 and 03

Hi,

I'm just looking at these samples and have some questions.

For sample 02 & 03 (client)

I see

Database.Free;

But I could not see where the Database is created?

Also For sample 03  client,

where is the code/logic that connects the client to the server? I could not see any code related to this.

Thanks
Rael

Offline

#2 2015-07-06 07:43:12

marius maximus
Member
From: Olsztyn
Registered: 2015-06-11
Posts: 30

Re: Understanding sample 02 and 03

Please look into DPR file
Sample 02:
https://github.com/synopse/mORMot/blob/ … ject02.dpr
line: 50
Form1.Database := TSQLRestServerDB.Create(Form1.Model,

About "where is the code/logic  that connects the client to the server?"
Server side:
  Server := TSQLRestServerDB.Create(Model,ChangeFileExt(ExeVersion.ProgramFileName,'.db3'));
  Server.CreateMissingTables;
  Server.ExportServerNamedPipe('03');
Client side:
  Form1.Database := TSQLRestClientURINamedPipe.Create(Form1.Model,'03');


Lazarus x64 Linux

Offline

Board footer

Powered by FluxBB