You are not logged in.
Pages: 1
I had nothing else to do in the last two months, so I could not follow the development of the project.
I have 2 projects where I use the mORMot framework, I have try to compile them with last version of framework. I think and I hope to have update right my code but I have a problem, how I must replace
Database.EngineExecute('VACUUM');
where Database is a TSQLRestClientURI in first project and TSQLRestClientDB in second project?
Is right use:
DatabaseServer.DB.Execute('VACUUM'); // on first project (DatabaseServer is TSQLRestServerDB);
Database.Server.DB.Execute(''VACUUM'); // on second project
Last question, the first project need of database backup function, so I have replaced this code:
Stream := TFileStream.Create(Folder + NewName + '.cbbak', fmCreate);
try
Stream.Seek(0, soFromBeginning);
DatabaseServer.Backup(Stream);
finally
Stream.Free;
end;
with this
DatabaseServer.DB.BackupBackground(Folder + NewName + '.cbbak', 1024, 0, BackupProgressEvento);
DatabaseServer.DB.BackupBackgroundWaitUntilFinished;
Is my new code right or need of some fix?
Thanks
Offline
??? I do not understand the VACUUM trick. Why use a double quote? Your line won't compile.
In all cases, such VACUUM is not to be run on the client side. New security policy would disallow it, for safety.
You can use DatabaseServer.DB.Execute() on server side safely, of course.
About the backup feature, the previous implementation has been found unstable, so has been removed to the knew background process.
IMHO you can use BackupBackground() directly, without using BackupBackgroundWaitUntilFinished, on the server side.
Offline
The "double quote" is a error. I'm not copy the code but rewrite it on post and then I have put a double quote.
Thank you fot this and for your great job.
Offline
Pages: 1