You are not logged in.
Pages: 1
Finally I create two synonyms for authuser and authgroup in dbData and authenticate two times (in dbSecurity and dbData). It's working now.
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
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 ?
Pages: 1