You are not logged in.
Pages: 1
ok. I found it. Thanks.
As the title....
I'm using OnAuthenticationFailed callback to capture some data when an invalid user/password tries to login. As user is not logged in, I don't have a session to capture the remote IP... Is there another way?
Hi all,
It could be a noob question, but I have some doubts about transactions management in Mormot...
Say I have this situation: 3 TSQLRecords inside a function and if one of them returns a error, all the others have to rollback.
pseudo-code:
procedure Save;
var
obj1: TPerson; //
obj2: TAddress; // All TSQLRecord
obj3: TPhones; //
begin
startTransaction;
try
obj1.name := 'test1';
TSQLRest.Add(obj1);
obj2.Address := 'Street1';
TSQLRest.Add(obj2); //----> Say I have an error here
obj3.phone := '65432';
TSQLRest.Add(obj3);
Commit;
except
RollBack;
end;
end;
How would I implement the above situation in Mormot?
I saw some functions for transactions control, but inside batch methods. They control only for 1 object with multiple records.
Thanks in advance.
Thanks lele9. I was looking for this too...
Are you using a legacy database or using a new one?
Hi,
I'm testing Mormot (latest commit - today) with FPC 3.1.1 and Lazarus 1.5 under Windows 8 64 bit and TestSQL3 is returning errors in some tests. In all "file based tests", I had errors in TSQLTableJSON, message "Invalid variant type cast" and a access violation under Bidirectional remote connection. The error shows up after test "SOA callback via JSON websockets: 4,455 assertions passed 138.47ms". I'm compiling in 32bit.
Compiler directives: -MObjFPC -Scgi -CX -O2 -XX -vewnhibq -Fi.. -Fifpc\i386-win32 -Fu.. -Fu. -FUfpc\i386-win32 -FE..\Output\ -dFPCSQLITE3STATIC
I added in TestSQL3.dpr in uses clause this:
{$ifdef FPC}
TestSQL3FPCInterfaces in 'TestSQL3FPCInterfaces.pas',
{$endif}
but errors still appears,
I hope this message is clear, as english is not my language...
Thanks
Pages: 1