You are not logged in.
Pages: 1
Hi there,
I'm having some trouble creating an instance of TSQLRestServerFullMemory to use with some interface based services in front of a Firebird database. My code is as follows
procedure TfrmSakilaServer.StartServer;
begin
//
Model := TSQLModel.Create([], ROOT_NAME);
DB := TSQLRestServerFullMemory.Create(Model, false);
// register our ISakilaRESTInterface service on the server side
DB.ServiceRegister(TSakilaRESTMethods, [TypeInfo(ISakilaRESTInterface)], SERVICE_INSTANCE_IMPLEMENTATION).
SetOptions([], [optExecInMainThread, optFreeInMainThread]);
HttpServer := TSQLHttpServer.Create(DEFAULT_HTTP_PORT, [DB], '+', HTTP_DEFAULT_MODE, 32, secNone);
HttpServer.AccessControlAllowOrigin := '*'; // allow cross-site AJAX queries
end;
The problem is with the line
DB := TSQLRestServerFullMemory.Create(Model, false);
What is wrong with my code?
Thanks for your assistance,
JD
Last edited by JD (2017-09-13 21:06:37)
Offline
You need a true sqlite engine in front of the external database.
Use TSQLRestServerDB, as documented.
Hi there ab,
I have established that the problem is due to the fact that the most recent version of mORMot (Version 1.18.3680 FTS3) has problems with Lazarus. I tried to compile TestSQL3.lpi using
a) Lazarus 1.8RC4/FPC 3.0.4
b) Lazarus stable (1.6.4/FPC 3.0.2)
c) NewPascal
While all three compiled without problems, the TestSQL3 executable produced by (a) and (b) does not run/work even in administrator mode. As for (c), the TestSQL3 executable worked and passed all the tests as expected BUT after it finishes and you press ENTER to close the console windows, an unending repeating sequence of error messages appears
Internal error: Unknown dwarf form: $17
Internal error: Unknown dwarf form: $19
TASK, line 5713 of ..\SynCrtSock.pas
EXECUTE, line 5671 of ..\SynCrtSock.pas
It is curious because all TestSQL3 executables produced by these Lazarus versions used to work before.
For the moment, I'll stick to using Delphi when I use mORMot (which means no Linux) but do you think it is worth investigating.
Thanks,
JD
Last edited by JD (2017-09-20 14:23:10)
Offline
On which platform?
Windows 7 64 bit but using Lazarus/NewPascal 32 bit versions. Delphi 2010
Last edited by JD (2017-09-20 17:55:06)
Offline
Any Progress on this ?
Cannot start TSQLRestServerFullMemory
Lazarus 1.8, windows
Offline
Pages: 1