You are not logged in.
Pages: 1
Thank you very much,
May i ask yet what is the simplest way to copy all database to new one. With the preserve of IDs? I found one update query with error in my db: (ErrorCode":11,"SQLite3ErrorCode":"secCORRUPT","Message":"Error SQLITE_CORRUPT (11) [Step] using 3.40.0 - database disk image is malformed, extended_errcode=779)
And now i thinking that copy all data to new database will be the best option.
SOLVED: forceID is your friend.
You are right, i use third party tool to check integrity.
So i tought i found something wrong, but that was simply my mistake, and my problems comes from other side. Sorry for bothered you, and other members.
I return to investigation.
Best Regards
The root should never be '' anyway.
Sorry for that - of course - i'am trying many ways and made mistake.
But I don't see any error in the log file of the gist.
And I have no problem running your dropbox project.
If you check database file data.db with integrity check there is no problems?
Ensure you downloaded the latest static files for mORMot 1 - current version of SQLite3 is 3.40.0, and from the logs, you have an older revision.
I doubt it is the root cause, but I suspect there is something wrong with your local mORMot setup.
I tested last mormot version with same results - but try it again.
Thanks ab,
Here is a gist:
https://gist.github.com/juwo123/f48e275 … 1341c1a5bb
Here is a simple project: https://www.dropbox.com/s/j6c0kwhe1ar1p … m.zip?dl=0 - only 2 standard TSQLAuthGroup, TsqlAuthUser
I run with CreateMissingTables.
I noticed one more thing - index problem appears only when root in TSQLModel.Create([TSQLAuthGroup, TsqlAuthUser],'sss') is different than ''
Thanks for respond. This is empty database. I only add two records and this causes (from integrity check):
row 1 missing from index IndexAuthUserLogonName
row 1 missing from index sqlite_autoindex_AuthUser_1
non-unique entry in index sqlite_autoindex_AuthUser_1
On production database with this index problem user cannot login (random user). After vacuum indexes are ok and user can login. But after few houres problem return.
Hi,
I have users table with emails as a logonname. I found very strange thing. If i add 2 users with logonname like below then i have:
row 1 missing from index IndexAuthUserLogonName
row 1 missing from index sqlite_autoindex_AuthUser_1
non-unique entry in index sqlite_autoindex_AuthUser_1
in my database. But if i remove "_" and add this 2 users all is fine. If i change 'aa_g@ot.eu' to 'a_ag@ot.eu' also work ok.
Index problems have impact to users login. Some cannot login to database. I spent 3 days trying to isolate problem and at this moment don't have idea what to do next. I will be gratefull for any idea.
(tested on last mormot 1)
Model_srv := CreateModel_srv('');
Db_srv2 := TSQLRestClientDB.Create(Model_srv,nil, ed_wynik.Text, TSQLRestServerDB, false, '');
a := TAuthUser.Create;
a.LogonName := 'a_d@ap.com';
Db_srv2.Add(a,True);
a.Free;
a := TAuthUser.Create;
a.LogonName := 'aa_g@ot.eu';
Db_srv2.Add(a,True);
a.Free;
db_srv2.Free;
Model_srv.Free;
There is a bug in SecDecrypt.
juwo, try remove line
FreeContextBuffer(InBuf[1].pvBuffer);
from the end of function SecDecrypt (SynSSPI.pas). This should solve your problem.
Yes, this is it!
ab, Chaa, many, many thanks for help.
Special statement to ab:
i'm impressed what is going on in mormot world. Your (and other mormot devs) work, have a big impact on my professional live. I think not only my. So, thank you one more time (with small danation for today dinner ).
Of course:
pic1: http://c-swde.com/p1.png
pic2: http://c-swde.com/p2.png
pic3: http://c-swde.com/p3.png
Thank you
Hi,
I'm fighting with this problem:
Mormot1 sources from 25.11.2021.
Delphi Seattle.
Client server app (TSQLHttpClient) tested also locally (TSQLRestClientDB) with the same error
- on 32bit all works fine
- compiled to 64bit can't login with windows auth (via SetUser('','')).
When debugging (screenshots from my breakpoints):
- https://gyazo.com/3f5bbb2422c26828a0ec898318d4bd5a
- https://gyazo.com/2a7fa19ddfcfa03f80ac8e460b7cf53f
- error coming from F8 in function Base64ToBinSafe on last "End":
https://gyazo.com/1f3613f6f9515ed6ff04e3693b9b5105
I will be grateful for any hint.
Best Regards
Sorry for bothering - solution: o.FillFrom(table, i)
Thanks for this great framework
Hi,
Since i can't find better way to use rtree index with simple max, min bound, i'm trying this way:
Model:
TSQLObj = class(TSQLRecord)
private
fTyp: RawUTF8;
fVisible : Boolean;
fX: TDoubleDynArray;
fY: TDoubleDynArray;
published
property Typ: RawUTF8 read fTyp write fTyp;
property Visible : Boolean read fVisible write fVisible;
property X: TDoubleDynArray index 1 read fX write fX;
property Y: TDoubleDynArray index 2 read fY write fY;
end;
TSQLObj_box = class(TSQLRecordRTree)
private
FminX: Double;
FmaxX: Double;
FminY: Double;
FmaxY: Double;
published
property minX: Double read FminX write FminX;
property maxX: Double read FmaxX write FmaxX;
property minY: Double read FminY write FminY;
property maxY: Double read FmaxY write FmaxY;
end;
Query:
table := mainfrm.database.ExecuteList ([TSQLObj, TSQLObj_box],
'select obj.id,obj.x,obj.y from obj, obj_box where (obj.rowid=obj_box.rowid) and '+
'(minx<='+f2str(maxx)+') and (maxx>='+f2str(minx)+') and (miny<='+f2str(maxy)+') and (maxy>='+f2str(miny)+') and '+
'(typ='+quotedstr(typ)+') and (visible=1)');
But i stuck with probably very simply problem. X and Y column are defined as TDoubleDynArray. How to access to them from table:TSQLTable. Simple table.getbytes not work. I can't figure it out
@edwinsn @ab thanks again for yours hints. I will try (for learning purpose) all suggestions. I have no words how valuable for me is mORMot. Thanks to this framework, in last few years, i discovered many new ways in pascal world.
Thank you. This is new field for me and these tips are invaluable. I join @edwinsn's request - any examples will be really appreciated.
Thanks a lot for new directions. Looks like i need to back to SAD documentation and rethink server part. But returning to my first question if i run mormot server as service for each client on different port with ssl (max. number of services is about 150) may i expect any problems?
I made some tests on weaker machine (2core, 2gb ram). I ran about 40 services and all worked very smooth. Surprisingly, since mormot is very well optimized, processor usage was 0% most of the time (in real use with connected clients).
Of course so many services is not best solutions and definitely i need rework it. But, as temporary solution, windows server will be able to handle about 150 services? Someone has any experience?
edwinsn: thanks for reverse proxying sub-domains idea
I plan to deploy my application on windows server 2012 (4 core 4 Gb RAM). Standard TSQLHttpServer running as a service. Each client will be using separate database, so i will install many services (on different ports). My question is: how many Mormot servers can be installed on one computer. Is there any limitations?
(each database will be used by 2-5 users)
PS ab - Many, many thanks for Mormot. Each time i post question i'm reminding myself to make donation - same this time.
Thanks a lot for your answers. I applied @edwinsn sugestion: variable and api on server
procedure TNoteServer.Model(Ctxt: TSQLRestServerURIContext);
begin
case Ctxt.Method of
mGET:
Ctxt.ReturnsJson(_ObjFast(['ver', model_ver]));
end;
end;
That works perfectly. Thanks!
@Bo you are correct i would like to avoid problems when not all clients was upgraded, or someone upgrade clients without server
Hi,
Is it possible to check (from client side - TSQLHttpClient) whether the server uses the same data model?
For example to show message "Please upgrade your server"
Regards
Thanks for explanation and many thanks for your effort.
PS
I made small donation - I promise more when I will sell my first mormot powered application
Thanks for reply,
I tested it on last nightly zip with the same result. "LIKE" return record "=" not. I prepare simply project with my SQLite db: https://dl.dropboxusercontent.com/u/23593726/test.zip
Best Regards
After some tests:
This work fine:
sza := TSQLSzablon.CreateAndFillPrepare(form1.Database, 'Nazwa LIKE ?',[nazwa_wzoru]);
this not:
sza := TSQLSzablon.CreateAndFillPrepare(form1.Database, 'Nazwa = ?',[nazwa_wzoru]);
(only with national chars, without work as expected)
Hi,
First many thanks for great framework.
I use old delphi version (6) and have a problem with polish national chars.
Field is defined as fNazwa: RawUTF8;
How to correctly pass params in CreateAndFillPrepare when field nazwa have chars like ą, ś, ć. If field contain this chars CreateAndFillPrepare return empty list. I try StringToUTF8 - not work.
Regards
Pages: 1