#51 Re: mORMot 1 » RTTI under FPC » 2015-05-18 13:10:11

ab wrote:

You should enjoy RTFM and generate a .pas source code file containing the needed RTTI for IIDAPSignaling.

See http://synopse.info/files/html/Synopse% … #TITLE_593

I hope the "interface RTTI" branch would reach soon the main FPC trunk.
In this branch, there is already the needed RTTI for x86/x64 and ARM32...

I read this part of the doc too.
But I only need to write this :

  SQLite3ConsoleTests;
  {$ifdef COMPUTEFPCINTERFACES}
  ChDir(ExtractFilePath(ParamStr(0)));
  ComputeFPCInterfacesUnit(
    ['..\CrossPlatform\templates','..\..\CrossPlatform\templates'],
     '\..\..\SQlite3\"my_unit".pas');
  {$endif}

and add "mORMotWrappers.pas" in the uses section ?

#52 mORMot 1 » RTTI under FPC » 2015-05-18 12:43:58

Thomas-Acia
Replies: 25

Hi,

I am writing a mORMot Server under FPC (Lazarus). This one must be executed in console mode only. But I have the RTTI error.
1431952873-rtti.png

I also read that : http://synopse.info/forum/viewtopic.php?id=2279 but I don't know if I can use RTTI for my server.

I need some councils.

Thank you in advance smile

#53 Re: mORMot 1 » Android/Java Client + FreePascal mORMot Server » 2015-05-18 12:07:23

ab wrote:

I never did this whole combination, but I guess that this is possible.

See https://github.com/synopse/mORMot/tree/ … /ChinaPeng

Any feedback to enhance the Java client code, especially adding a new Mustache template to auto-generate the client code wrapper for Java, is welcome!


Thank you. I'll study this !

#54 mORMot 1 » Android/Java Client + FreePascal mORMot Server » 2015-05-18 08:52:11

Thomas-Acia
Replies: 2

Hi,

Is it possible to connect an Android Client (JAVA) to a mORMot Server (FPC+Lazarus) using ZEOS + POSTGRESQL ?

Thank you

#55 Re: mORMot 1 » ZeosDB » 2015-05-04 10:01:00

miab3 wrote:

From what I see CodeTyphon current version(5.30), release date 29-Apr-2015:
http://www.pilotlogic.com/sitejoom/inde … codetyphon
includes the latest version of ZEOS 7.2 beta r3619(r3627).

Michal

Yes. I rebuilt all with CodeTyphon this morning. I just tested the connection with a postgres server, it's working well with linux debian 7. (Windows too of course !)

#56 Re: mORMot 1 » ZeosDB » 2015-04-30 13:52:28

Syntaxe mode : Delphi was not activated...

#57 Re: mORMot 1 » ZeosDB » 2015-04-29 15:26:09

So, I finished all my tests.

To conclude :

Now it's working ! BUT even if I use your revision, I have the problem. So I decided to use the ZEOS library given with CodeTyphon and now it's working. So I don't know what the problem is, but now it's working.

If I can give a council to all users who have the same problem: Use the Zeos lib given with codetyphon (C:\codetyphon\typhon\components\pl_ZeosDBOx\source\*).

#58 Re: mORMot 1 » ZeosDB » 2015-04-29 11:25:00

miab3 wrote:

@Thomas-Acia,

Use the version:
Zeos7.2-beta branches_ testing_Revision 3619(3627):
http://svn.code.sf.net/p/zeoslib/code-0 … sting-7.2/

I have not encountered significant problems in all my tests:
http://zeoslib.sourceforge.net/viewtopi … 664#p38406

Michal


Ok. Answer in 2h max !

#59 Re: mORMot 1 » ZeosDB » 2015-04-29 09:31:43

ab wrote:

We did not fully tested SynDBZeos with FPC yet.

Did you ask for support in the Zeos forums?

I'll ask them and I'll share the answer here.

#60 mORMot 1 » ZeosDB » 2015-04-29 07:29:06

Thomas-Acia
Replies: 21

Hi,

I'm working right now on an Android Project, Client Server. And I have to use a data base. I wanted to know if the Zeos library is working with FPC 3.1.1/mORMot on Linux ? Because I have some compilation errors with ZCompatiblity for example : ZCompatibility.pas Error: Some fields coming before " " were not initialized

PS: I also checked the Zeos version, I have the trunk version.

Edit 2 : Compilation with Delphi : OK but codetyphon not working !

Edit 3 : My problem is coming when I include SynDBZeos. It loads different units and the compilation returns errors. My objective is to use only PostgreSQL
           Normally, if you create a sample application and include SynDBZeos, it's not working... (with FPC of course)

Thank's

#61 Re: mORMot 1 » "ExportServerNamedPipe" Alternative » 2015-04-22 12:01:15

AOG wrote:

In your client code, you send variables "A" and "B" to server method "Sum":

fClient.CallBackGetResult('Sum',['A',a,'B',b])

In your server code, you decode "Nombre 1" and "Nombre 2" in method "Sum":

UrlDecodeDouble(Ctxt.Parameters,'Nombre 1 :',a);
UrlDecodeDouble(Ctxt.Parameters,'Nombre 2 :',b,@Ctxt.Parameters);

Try this in your server:

UrlDecodeDouble(Ctxt.Parameters,'A=',a);
UrlDecodeDouble(Ctxt.Parameters,'B=',b,@Ctxt.Parameters);

It was a stupid error. My method "Sum" was declared in the class "TServiceServer" and when I called the function I used the class "TSQLNoteFile" neutral

#62 Re: mORMot 1 » "ExportServerNamedPipe" Alternative » 2015-04-22 08:03:35

I had the Sum function to the server and I create a button to do the calcul to the client (Sample 26). There are my codes :

Server :

 type
  // TSQLRestServerFullMemory kind of server is light and enough for our purpose
  TServiceServer = class(TSQLRestServerFullMemory)
  published
    procedure Sum(Ctxt: TSQLRestServerURIContext);
  end;

  { TServiceServer }

procedure TServiceServer.Sum(Ctxt: TSQLRestServerURIContext);
var a,b: double;
begin

  if UrlDecodeNeedParameters(Ctxt.Parameters,'A,B') then begin
    while Ctxt.Parameters<>nil do begin
      UrlDecodeDouble(Ctxt.Parameters,'Nombre 1 :',a);
      UrlDecodeDouble(Ctxt.Parameters,'Nombre 2 :',b,@Ctxt.Parameters);
    end;
    Ctxt.Results([a+b]);
  end else
    Ctxt.Error('Missing Parameter');
end;

Client :

procedure TMainForm.btn_calcClick(Sender: TObject);
//ajout de la somme
  var a,b: double;
    err: integer;
    Note: TSQLNoteFile;

begin
  val(edt_a.Text,a,err);
  if err<>0 then begin
    edt_a.SetFocus;
    exit;
  end;
  val(edt_b.Text,b,err);
  if err<>0 then begin
    edt_b.SetFocus;
    exit;
  end;

  if fClient=nil then
    exit;
    Note := TSQLNoteFile.Create;
  try
   lbl_res.Caption := UTF8ToString(fClient.CallBackGetResult('Sum',['A',a,'B',b]));
  finally
    Note.Free;
  end;
end;

But the result is : 400 Bad Request. I used CommView to check if the client's connection to the server is working, it is. I think my problem is in the code but I don't see it ...

#63 Re: mORMot 1 » "ExportServerNamedPipe" Alternative » 2015-04-21 12:50:17

Ok. It's a very good project for me and all the team is working very well to fix the mistakes.

Thank you for your councils !

#64 Re: mORMot 1 » "ExportServerNamedPipe" Alternative » 2015-04-21 12:33:14

AOG wrote:

Add this:

unit RESTServerClass;

interface

{$I Synopse.inc} // <---- add this !!

uses
  SysUtils,
  Classes,

Thank you. I'm sorry for all my questions but I'm new in the mORMot's world !

#65 Re: mORMot 1 » "ExportServerNamedPipe" Alternative » 2015-04-21 12:05:39

"  FileFromString(Ctxt.Call.InBody,FileName); "

RESTServerClass.pas(68,32) Fatal: Syntax error, ")" expected but "identifier INBODY" found

roll

#66 Re: mORMot 1 » "ExportServerNamedPipe" Alternative » 2015-04-21 11:51:06

AOG wrote:

Have a look at Sample 26 !
You will find all you need !!

Thank's !!!!! big_smile big_smile

#67 mORMot 1 » "ExportServerNamedPipe" Alternative » 2015-04-21 10:22:38

Thomas-Acia
Replies: 10

Hi,

I would like to create a little server with the "Sum" fonction, as we can see in the Sample 06 but I would like to create a communication between a server on linux and a client on W7. So I'm searching an alternative to replace the function ExportServerNamedPipe.

Can I use a TSQLRestServer ?

#68 Re: mORMot 1 » Error while linking » 2015-04-17 14:24:11

AOG wrote:

Edit:
Happens also when compiling for Linux i386.

Yes, I tried to compile for Linux i386 too.

AOG wrote:

Common:
Static linking of (latest) sqlite gives this error.
Dynamic linking: all ok.

I resolved my problem !

I add this : {$DEFINE NOSQLITE3STATIC} at the top of Synopse.inc

So, when I include Synopse.inc, it's working well.

#69 Re: mORMot 1 » Error while linking » 2015-04-17 09:02:47

For example, the Sample 1 of SQLite3 is working well.
But here, I tried the 21st and he didn't compile.

I just re-executed the script. Same result ..


I found this error on the Internet but nothing interesting for my case

#70 mORMot 1 » Error while linking » 2015-04-17 07:56:41

Thomas-Acia
Replies: 8

Hi,

I think a lot of us already had this error but I didn't find how to solve it.
When I compile with Windows, it works perfectly but with Linux, sometimes I have "Error: Error while linking".
So I don't know if it's a library problem or something else.

1429257190-sans-titre.png

Thank you !

#71 Re: mORMot 1 » Error(s) launching Test SQL3 » 2015-04-16 10:07:59

Ok, Thank you. I am reassured that the problem does not come from me.

PS: You do a very good work. wink

#72 mORMot 1 » Error(s) launching Test SQL3 » 2015-04-16 09:48:17

Thomas-Acia
Replies: 2

Hello,

I installed CodeTyphon few days ago in order to build Typhon IDE and to have the last FPC version. So I have Typhon IDE v 5.2 and FPC 3.1.1 (2015-04-13).
I downloaded the mORMot Framework too.

I had many problems during the installation but now it's solved. So I wanted to test "TestSQL3" to check if all is good.

On Windows 7 :

-I have only one problem. During the step 2.8. Bidirectional remote connection, I have this mistake : 1429177403-error-windows.png

And when I arrive to step 2.10 Multi thread process, the program doesn't continue.

On Linux (Debian 7 Jessie 32 bits) :

1429177576-error-linux1.png

1429177576-error-linux2.png



I also tried to compile and run the differents samples, it's working.


PS: Sorry if I did English mistakes, I'm French and I'm a young trainee.


Thank You !

Board footer

Powered by FluxBB