You are not logged in.
Pages: 1
I enabled SQL statements on the log. And the error happened again together with this SQL statement:
20140623 14130040 SQL TDBServer(02701510) SELECT ID,DataAlteracao,IdCliente,Cliente,Nome,Descricao FROM Vendas WHERE ID = 3482 AND ID = ; prepared with 1 param
20140623 14130040 EXC ESQLite3Exception ("near \"AND\": syntax error") at 00268AA2 SynCrypto.TAESAbstract stack trace 002ADFC0 mORMot.TSQLRestServer.SessionAccess (26413) 002AD5BF mORMot.TSQLRestServer.URI (26250) 002B03F5 mORMot.TSQLRestStorageInMemory.Create (27544) 00005CB2 System.@GetMem 0000A2E0 System.@NewAnsiString 002DD401 Vcl.Buttons.TSpeedButtonActionLink.IsGlyphLinked 002D625F SynCrtSock.THttpApiServer.Execute (5002) 002DB3AC Vcl.Buttons.{System.Generics.Collections}TList<System.Integer> 000D17D0 System.Classes.ThreadProc 0000A1EA System.ThreadWrapper
This SQL was not generated by hand, not even after the where clause.
I put the .map file in the Exe folder. The error looks like this now:
20140613 14511433 EXC ESQLite3Exception ("near \"AND\": syntax error") at 00267782 SynSQLite3.sqlite3_check (4207) stack trace 002AB0D4 mORMot.TSQLRestServerURIContext.ExecuteORMGet (25504) 002AA6D3 mORMot.TSQLRestServerURIContext.Execute (25335) 002AD4F4 mORMot.TSQLRestServer.URI (26234) 00005CB2 System.@GetMem 0000A2E0 System.@NewAnsiString 002D849D mORMotHttpServer.TSQLHttpServer.Request (570) 002D12FB SynCrtSock.THttpServerGeneric.Request (2003) 002D6448 SynCrtSock.THttpApiServer.Execute (5053) 000D17D0 System.Classes.ThreadProc 0000A1EA System.ThreadWrapper
20140613 14511504 EXC ESQLite3Exception ("TSQLRequest.Reset called with no previous Request") at 00267244 SynSQLite3.TSQLRequest.Reset (4127) stack trace 002AB0D4 mORMot.TSQLRestServerURIContext.ExecuteORMGet (25504) 002AA6D3 mORMot.TSQLRestServerURIContext.Execute (25335) 002AD4F4 mORMot.TSQLRestServer.URI (26234) 00005CB2 System.@GetMem 0000A2E0 System.@NewAnsiString 002D849D mORMotHttpServer.TSQLHttpServer.Request (570) 002D12FB SynCrtSock.THttpServerGeneric.Request (2003) 002D6448 SynCrtSock.THttpApiServer.Execute (5053) 000D17D0 System.Classes.ThreadProc 0000A1EA System.ThreadWrapper
20140613 14511535 EXC ESQLite3Exception ("TSQLRequest.Reset called with no previous Request") at 00267244 SynSQLite3.TSQLRequest.Reset (4127) stack trace 002AB0D4 mORMot.TSQLRestServerURIContext.ExecuteORMGet (25504) 002AA6D3 mORMot.TSQLRestServerURIContext.Execute (25335) 002AD4F4 mORMot.TSQLRestServer.URI (26234) 00005CB2 System.@GetMem 0000A2E0 System.@NewAnsiString 002D849D mORMotHttpServer.TSQLHttpServer.Request (570) 002D12FB SynCrtSock.THttpServerGeneric.Request (2003) 002D6448 SynCrtSock.THttpApiServer.Execute (5053) 000D17D0 System.Classes.ThreadProc 000
Yes, it's the latest sqlite3*.obj available. This error with the server in production with clients using.
Does the map file should be in the server folder, even using it in a "production state"?
On the case of the SQL statement, Do you think that this ticket http://synopse.info/fossil/tktview?name=ea07928ae9 could help?
Yes, the is in the .exe folder after a compilation
The ProjectOptions > Delphi Compiler > Linking > Map File option is already set to Detailed
Is there any other option that should be turned on?
I don't know exactly. Here is the whole log file:
TSQLLog 1.18 2014-05-28T11:40:04
20140528 11400425 EXC ESQLite3Exception ("near \"AND\": syntax error") at 0066826A stack trace 006ABA60 006AB05F 006ADE80 00406CB2 0040B2E0 006D8E05 006D1C63 006D6DB0 004D27D0 0040B1EA 75D3339A 773E9EF2 773E9EC5
20140528 14423019 EXC ESQLite3Exception ("near \"AND\": syntax error") at 0066826A stack trace 006ABA60 006AB05F 006ADE80 00406CB2 0040B2E0 006D8E05 006D1C63 006D6DB0 004D27D0 0040B1EA 75D3339A 773E9EF2 773E9EC5
20140528 14471410 EXC EHttpApiServer ("HttpSendHttpResponse failed: The I/O operation has been aborted because of either a thread exit or an application request (995)") at 006D5CEE stack trace 004D27D0 0040B1EA 75D3339A 773E9EF2 773E9EC5
20140528 15151820 EXC ESQLite3Exception ("TSQLRequest.Reset called with no previous Request") at 00667D2C stack trace 006ABA60 006AB05F 006ADE80 00406CB2 0040B2E0 006D8E05 006D1C63 006D6DB0 004D27D0 0040B1EA 75D3339A 773E9EF2 773E9EC5
20140529 10395406 EXC ESQLite3Exception ("near \"AND\": syntax error") at 0066826A stack trace 006ABA60 006AB05F 006ADE80 00406CB2 0040B2E0 006D8E05 006D1C63 006D6DB0 004D27D0 0040B1EA 75D3339A 773E9EF2 773E9EC5
20140529 10395416 EXC ESQLite3Exception ("near \"AND\": syntax error") at 0066826A stack trace 006ABA60 006AB05F 006ADE80 00406CB2 0040B2E0 006D8E05 006D1C63 006D6DB0 004D27D0 0040B1EA 75D3339A 773E9EF2 773E9EC5
20140529 11063231 EXC ESQLite3Exception ("near \"AND\": syntax error") at 0066826A stack trace 006ABA60 006AB05F 006ADE80 00406CB2 0040B2E0 006D8E05 006D1C63 006D6DB0 004D27D0 0040B1EA 75D3339A 773E9EF2 773E9EC5
20140529 11063238 EXC ESQLite3Exception ("TSQLRequest.Reset called with no previous Request") at 00667D2C stack trace 006ABA60 006AB05F 006ADE80 00406CB2 0040B2E0 006D8E05 006D1C63 006D6DB0 004D27D0 0040B1EA 75D3339A 773E9EF2 773E9EC5
20140529 11063245 EXC ESQLite3Exception ("TSQLRequest.Reset called with no previous Request") at 00667D2C stack trace 006ABA60 006AB05F 006ADE80 00406CB2 0040B2E0 006D8E05 006D1C63 006D6DB0 004D27D0 0040B1EA 75D3339A 773E9EF2 773E9EC5
20140529 16024706 EXC ESQLite3Exception ("near \"AND\": syntax error") at 0066826A stack trace 006ABA60 006AB05F 006ADE80 00406CB2 0040B2E0 006D8E05 006D1C63 006D6DB0 004D27D0 0040B1EA 75D3339A 773E9EF2 773E9EC5
Hello friends,
I saw this error on the log:
20140528 14471410 EXC EHttpApiServer ("HttpSendHttpResponse failed: The I/O operation has been aborted because of either a thread exit or an application request (995)") at 006D5CEE stack trace 004D27D0 0040B1EA 75D3339A 773E9EF2 773E9EC5
What does it mean?
When it happens, can I make the TSQLHttpClientWinHTTP try to connect again? How can I show a message to the user?
Hello,
I'm getting this error on the log on the client side:
20140526 10314844 ERROR TSQLHttpClientWinHTTP(067C3460) POST root/ConfigcxGrids returned 503 Service Unavailable with message Service Unavailable stack trace API 00678D5D 006B9B58 006BA020 006B5A13 006C60A8 00C81B24 01371419 013707DD 0062E164 01372FDB 01372A3D 014EDFC5 013D6D43 00556A5D 0055ABEE 00578B99 004D8B92 769986EF 76998876 769989B5
20140526 11222717 ERROR TSQLHttpClientWinHTTP(067C3460) GET root returned 503 Service Unavailable with message Service Unavailable stack trace API 00678D5D 006B9B58 006B87EE 006B4C1B 006ACC0C 00D9544C 014ED98B 014EC918 013716A3 0136FE85
What does it mean this "503 Service Unavailable" error? how can I avoid it?
Hello,
After get the last source available (http://synopse.info/fossil/info/85371eca41). I got some errors on doing a Updates on the Database.
I'm using the Update function on the TSQLHttpClient.
This is a example of the errors on the server side:
20140428 08555838 ! EXC ESQLite3Exception ("unrecognized token: \":\"") at 00263E8E SynSQLite3.sqlite3_check (4207) stack trace API 002590CC SynCommons.SynRtlUnwind (37845) 000097CC System.@HandleOnException
20140428 08555838 ! ERROR TDBServer(02420BB0) ESQLite3Exception(unrecognized token: ":") for UPDATE Usuario SET IDEmpresa=:(1):,Excluido=:(false):,DataAlteracao=:(135173410298):,IDUsuarioCadastro=:(1):,Login=:('MASTER'):,Senha=:('c4ca4238a0b923820dcc509a6f75849b'):,Status=:('Ativo'):,Supervisor=:(true):,Master=:(true):,AgendaStartup=:(false):,MoedasCotacoesStartup=:(false):,Email=:(''):,SmtpServer=:(''):,SmtpConta=:(''):,SmtpSenha=:(''):,SmtpPorta=:(0):,SmtpSSL=:(false):,IdColaborador=:(1):,ColaboradorNome=:('Administrador MASTER'):,IdUserPerfil=:(1):,PerfilNome=:('Administrador'):,IdCompraLimites=:(1):,CompraLimitesNome=:('Comprador'):,PCPApontamento=:(false): WHERE RowID=:(1):; stack trace API 002C3EBA mORMotSQLite3.TSQLRestServerDB.EngineExecute (894) 002C3F38 mORMotSQLite3.TSQLRestServerDB.EngineExecuteFmt (903) 002C476B mORMotSQLite3.TSQLRestServerDB.EngineUpdate (1107) 002A6D99 mORMot.TSQLRestServerURIContext.ExecuteORMWrite (24967) 002A57E7 mORMot.TSQLRestServerURIContext.Execute (24588) 002A83C0 mORMot.TSQLRestServer.URI (25463) 002D20AD mORMotHttpServer.TSQLHttpServer.Request (570) 002CB0EB SynCrtSock.THttpServerGeneric.Request (1963) 000D1620 System.Classes.ThreadProc 0000A1EA System.ThreadWrapper
If I use this version http://synopse.info/fossil/info/8ace6648d5 of the source the error doesn't occur.
I'm using TSQLHttpServer and TSQLHttpClient, both with administrator rights.
How can I set in VERBOSE mode in those classes?
I've searched in both classes and didn't find anything like it.
I'm already using the last version.
Is there some kind of Log that I can use to find out?
Hello,
I've developed a program that uses the TSQLRestServerDB with the ORM and SQlite and some Method-based services.
The application works quite well, very stable, but sometimes the application freezes trying to connect to the server, somehow looks like that it loses the connection, but before it happens was working fine.
The internet connection is very stable, when client loses connection with the server the internet connection still working fine.
What could be the problem?
Which version of the IDE do you have? Depending on which one, you could get it for free in the Embarcadero website.
I have a version of the installer to use as a trial. If you need to, I can send it to you.
What's up Homies???
What do you guys think about make mORMot compatible with the new FireDAC?
S. Colbert
Great, now works perfectly.
Thanks.
S. Colbert
Hi, thanks for the answer.
But now it gives another error: "Can't create new instance without CONSTRUCTOR constraint in type parameter declaration"
Hello,
The last version does not compile in Delphi XE2. http://synopse.info/fossil/info/38f27c96d6
Error that shows is "Undeclared identifier: 'List' "
Done, ticket is this one http://synopse.info/fossil/tktview?name=72b3d8e616
I think I expressed myself badly.
I'm already using the lastest version of the source.
Yup... What could be the cause o this error?
Hi,
When trying to restore a db using TSQLRestServerDB.Restore, I got this error: "DBOpen called twice".
What is the cause of this error? Seems like it happens in this line o code:
function TSQLDataBase.DBOpen: integer;
(....)
if fDB<>0 then
raise ESQLite3Exception.Create('DBOpen called twice'); //happens here
if (sqlite3=nil) or not Assigned(sqlite3.open) then
Hello,
I'm starting a new project that I have to use MySQL as the database, in this project I'll be handling lots of joins and views.
In the framework, Can I use the ORM to do all this things (Connection, etc...)? With your experience what would be the best way to get those results?
Ok, what method is used to handle JSON in this situation?
I didn't find anything like it in the SAD documentation about Method-Based service.
Will This solve the memory issue?
How can I get the file in the client? Because now I'm using:
function DownloadFile(FileName: RawUTF8): Boolean;
var
aResp: RawUTF8;
aPathFile: string;
begin
try
aResp := Http.CallBackGetResult('SendFile', ['FileName', FileName]);
aPathFile := ExtractFilePath(Application.ExeName) + UTF8ToString(FileName);
if FileFromString(Base64ToBin(aResp), aPathFile) then
begin
FileSetDate(aResp, DateTimeToFileDate(GetDateFile(FileName))); //GetDateFile is one of my functions
Result := True
end
else
MsgErro('Error on download');
except
Result := False;
end;
end;
I tried to use this code without the Base64ToBin method, but debugging I saw
aResp = ''
in other words I can't get the result with this line of code
aResp := Http.CallBackGetResult('SendFile', ['FileName', FileName]);
I'm using this method:
procedure TDBServer.SendFile(var Ctxt: TSQLRestServerCallBackParams);
var
FileName: RawUTF8;
Content : RawByteString;
begin
if UrlDecodeNeedParameters(Ctxt.Parameters, 'FileName') then
begin
FileName := Ctxt.InputUTF8['FileName'];
Content := BinToBase64(StringFromFile(ExtractFilePath(Application.ExeName) +
'\Update\' + FileName));
Ctxt.Results
([Content]);
end
else
Ctxt.Error('Missing Parameter');
end;
It works, but after use it the memory of the server raises from 4MB to 20 MB.
What could be the problem? is it the Framework or the Code?
With this new feature (using
Model.SetCustomCollationForAllRawUTF8('NOCASE')
) will have any change on the way that the database handles latin characters?
Will still be case insensitive?
Can we do it if a database that is already created or we have to create a new database?
Now I'm using TSynMemoryStreamMapped to get the file and TRawByteStringStream to use the BinToHex method.
procedure TDBServer.SendFile(var Ctxt: TSQLRestServerCallBackParams);
var
aFile: TSynMemoryStreamMapped;
Strm: TRawByteStringStream;
begin
Strm := TRawByteStringStream.Create;
aFile:= TSynMemoryStreamMapped.Create(ExtractFilePath(Application.ExeName) + '\Files\asd.pdf');
aFile.SaveToStream(Strm);
Ctxt.Results([BinToHex(Strm.DataString)]);
end;
In the client, trying to turn to a File again:
var
aResp: RawUTF8;
Data: array of single;
aFile: TSynMemoryStreamMapped;
Strm: TRawByteStringStream;
begin
aResp := Client.CallBackGetResult('SendFile', []);
if aResp <> '' then
begin
SetLength(Data, length(aResp) div 8);
if not SynCommons.HexToBin(pointer(aResp), pointer(Data), length(Data) * 4)
then
exit;
end;
aFile:= TSynMemoryStreamMapped.Create(aResp);
aFile.SaveToFile(ExtractFilePath(Application.ExeName) + '\Files\asd.pdf');
end;
This code does'nt work.
How can I turn it into a File again?
I was looking at the roadmap and I saw this entry:
Direct connection of interface-driven services from a rich C# client, with a code generation tool
What's the idea for this feature? I'm very interested in it, what can I do to help you with it?
What would be method-based service? Where can i find more information about it?
I have client-server application with ORM and TSQLRecord inherited classes, can I use the same TSQLHttpServer to provide this services?
Nation, hello!
I need to Compress a file (it has about 15 MB) and send it from a server to a client using Interfaced Based Services.
What would be the better approach?
Perfect, problem solved with this new update.
Thank you.
May God have mercy of our souls.
I'm using the latest unstable 1.18 release
The value of W.ColNames is:
('"RowID":', '"IDEmpresa":', '"Excluido":', '"DataAlteradao":', '"IDUsuarioCadastro":', '"IdPerfil":', '"ActionName":', '"DescricaoMenu":', '"Ativo":', '')
Hello,
I was using Batch Update with SQlite and I found this error on the file mORMot.pas. This just happens with BatchUpdate all the others work perfectly.
In this command I'm trying to Update 67 records.
procedure TSQLRecordProperties.SetSimpleFieldsExpandedJSONWriter(
W: TJSONWriter; withID: boolean; Occasion: TSQLOccasion);
var i, id, n: integer;
begin
...
assert(id=length(W.ColNames)); //error happens here
end;
One way to solve this problem is to create a Loadable Extensions with this collation.
http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions
Do anyone know how can we do that with SYSTEMNOCASE?
I have the same problem but with SQlite with other management tools.
Can we use the framework to create a Database without this Collation, can I use other collations instead?
In my case, I don't know if is the best for me because I am using the class as a TSQLHttpServer and my client is in delphi.
Should I use interfaced based services? How can I get the progress of the file transfer?
Hi,
Gentlemen, what would be the most appropriate way (faster) to send a File from the server to the Client?
For Now I'm using the REST approach with the ORM and a SQlite database.
God bless us all.
Thank you
Pages: 1