You are not logged in.
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 ?
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.
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 ![]()
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 !
Hi,
Is it possible to connect an Android Client (JAVA) to a mORMot Server (FPC+Lazarus) using ZEOS + POSTGRESQL ?
Thank you
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 !)
Syntaxe mode : Delphi was not activated...
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\*).
@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#p38406Michal
Ok. Answer in 2h max !
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.
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
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" ![]()
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 ...
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 !
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 !
" FileFromString(Ctxt.Call.InBody,FileName); "
RESTServerClass.pas(68,32) Fatal: Syntax error, ")" expected but "identifier INBODY" found
![]()
Have a look at Sample 26 !
You will find all you need !!
Thank's !!!!!
![]()
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 ?
Edit:
Happens also when compiling for Linux i386.
Yes, I tried to compile for Linux i386 too.
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.
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
Ok, Thank you. I am reassured that the problem does not come from me.
PS: You do a very good work. ![]()
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 : 
And when I arrive to step 2.10 Multi thread process, the program doesn't continue.
On Linux (Debian 7 Jessie 32 bits) :
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 !