#2 mORMot 1 » Get Remote IP when authentication fails » 2017-11-14 18:55:35

ramersonw
Replies: 2

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?

#3 mORMot 1 » Doubt about Transactions » 2015-12-29 20:19:21

ramersonw
Replies: 1

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.

#4 Re: mORMot 1 » TTimeLog and Javascript client » 2015-08-13 18:03:48

Thanks lele9. I was looking for this too...

#5 Re: mORMot 1 » mORMot + ZEOS + FB » 2015-08-13 17:58:19

Are you using a legacy database or using a new one?

#6 Free Pascal Compiler » Error in TestSQL3 » 2015-07-16 13:53:43

ramersonw
Replies: 0

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

Board footer

Powered by FluxBB