#1 Re: mORMot 1 » Authentication on two external databases » 2014-11-14 10:02:01

Finally I create two synonyms for authuser and authgroup in dbData and authenticate two times (in dbSecurity and dbData). It's working now.

#2 mORMot 1 » Authentication on two external databases » 2014-11-13 17:32:54

theodor_gl
Replies: 2

Hi ab,

I have a single http server that allows access in two databases dbSecurity (domain=root) and dbData (domain=rootData).
Authentication from dbSecurity is working and I can access the model classes from dbSecurity but I have a problem when I want to remote access a class from dbData model. I receive Error=403 (Forbidden). Is this because I need to authenticate also in dbData server ? I do not want to duplicate the TSQLAuthUser and TSQLAuthGroup tables.

Regards - Teo

#3 mORMot 1 » Paging with External Database » 2014-09-17 13:31:50

theodor_gl
Replies: 1

I try to change sample 28 to a SQL Server database and I encounter some errors when I use paging.

My datamodel is

  TMFFisa = class(TSQLRecord)
  private
    fDenumire: RawUTF8;
  published
    property Denumire: RawUTF8 index 50 read fDenumire write fDenumire;
  end;



using the URIPagingParameters

  aRestServer := TSQLRestServerDB.Create(aModel,':memory:',false); // authentication=false

  aRestServer.URIPagingParameters.StartIndex := 'PAGE=';
  aRestServer.URIPagingParameters.Results := 'LIMIT=';
  aRestServer.URIPagingParameters.SendTotalRowsCountFmt := ',"total":%';
  aRestServer.URIPagingParameters.Sort := 'SIDX=';
  aRestServer.URIPagingParameters.Dir := 'SORD=';

The result for a call
http://localhost:8888/root/MFFisa/?Select=*&page=3&limit=30&SIDX=Denumire&SORD=desc

is ok, but in log I see the query: SELECT Count(*) FROM MFFisa ORDER BY Denumire DESC 


For
http://localhost:8888/root/MFFisa/?Select=*&page=3&limit=30&SIDX=Denumire&SORD=asc

I get an error Column \"dbo.MFFisa.Denumire\" is invalid in the ORDER BY clause because it is not contained in either an aggregate function or the GROUP BY clause.

Is it ok to have ORDER BY in the select count(*) query ?

Board footer

Powered by FluxBB