#1 2016-10-06 01:35:37

oraclei
Member
Registered: 2016-06-06
Posts: 18

What's wrong AuthGroup,AuthUser in Mariadb Database?

I use follow code create mORMot auth table in mairab 5.5.50 database:

    fConn := TODBCConnectionProperties.Create('',RawUTF8(connectionString), '', '');
    fModel := TSQLModel.Create([TSQLAuthGroup,TSQLAuthUser, ...]);
    VirtualTableExternalMap(fModel, TSQLAuthGroup, fConn, 'mormot_auth_group');
    VirtualTableExternalMap(fModel, TSQLAuthUser, fConn, 'mormot_auth_user');
    fRestServer := TSQLRestServerDB.Create(fModel, ':memory:', False); // authentication=false
    fRestServer.AuthenticationRegister(TSQLRestServerAuthenticationDefault);
    fRestServer.CreateMissingTables;

When I run these code, it create AuthGroup,AuthUser table correctly, but the log report error:

ESQLite3Exception {"ErrorCode":1,"SQLite3ErrorCode":2,"Message":"Error SQLITE_ERROR (1) [SELECT RowID FROM AuthUser LIMIT 1] using 3.13.0 - no such table: AuthUser, extended_errcode=1"} at 006A4D6E  stack trace API 005E4350 005E4378 

The C/S application can work fine, and the mORMot default groups, users created correctly.  I drop the mormot_auth_group,mormot_auth_user, run again, the error still reported!  I change the code:

    VirtualTableExternalMap(fModel, TSQLAuthGroup, fConn, 'AuthGroup');
    VirtualTableExternalMap(fModel, TSQLAuthUser, fConn, 'AuthUser');

Nothing help ,but the error .


What's wrong with my codes? any clue? thanks lots !

Offline

#2 2016-10-06 06:31:24

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: What's wrong AuthGroup,AuthUser in Mariadb Database?

Where is the error raised?

Offline

Board footer

Powered by FluxBB