You are not logged in.
Pages: 1
ty for all, i think now all ok.
its free for use program, not for sale, but what you logo use in about screen or only name of library?
//my trys to create TSQLRestStorageInMemory
If Not Assigned(Model) Then
Model := CreateSampleModel;
Database := TSQLRestClientDB.Create(Model, CreateSampleModel, filename, TSQLRestServerDB);
Database.Server.CreateMissingTables;
StDatabase := TSQLRestStorageInMemory.Create(TSQLPoint, Database.Server, filename);
StDatabase := TSQLRestStorageInMemory(Database.Server.StaticDataAdd(StDatabase));
Or i don`t need this - if all ok now all work - i use only Database.MultiFieldValues
And all read cycles use 4781 Mks
Ty for answer, very good documentation - i find what i need.
But, can i think best and easy way - TSQLRestStorageInMemory.
How use this is it? i have only 2 tables.
ty again.
My first experience work with SQLite and DB, i use Delphi 2010 for create simple GPS where have 2 tables (TSQLLink = Class(TSQLRecord), TSQLPoint = Class(TSQLRecord)).
I read docs and forum, but cant find methods to do this:
Function DelPoint(ID: Int64): boolean;
Begin
Result := false;
If Assigned(MainForm.Database) Then
Result := MainForm.Database.Delete(TSQLPoint, ID);
End;
Function AddLink(start_point_id: Integer = 0; end_point_id: Integer = 0; one_way: Integer = 0; temp_link: Integer = 0): Boolean;
Var
Rec: TSQLLink;
Begin
Result := False;
If Assigned(MainForm.Database) Then
Begin
Rec := TSQLLink.Create;
Try
Rec.start_point_id := start_point_id;
Rec.end_point_id := end_point_id;
Rec.one_way := one_way;
Rec.temp_link := temp_link;
If MainForm.Database.Add(Rec, {true} false) = 0 Then //ofc here i have error of DB is Busy
Result := False
Else
Begin
MainForm.AddLinkList(MainForm.SGLink, Rec);
End;
Finally
FreeAndNil(Rec);
End;
End;
End;
//....
rcPoint := TSQLPoint.CreateAndFillPrepare(Database, 'X >= ? AND X <= ? AND Y >= ? AND Y <= ?', [OnMap.X - 150, OnMap.X + 150, OnMap.Y - 150, OnMap.Y + 150]);
If rcPoint.FillOne Then
Begin
AddLink(Bottom, rcPoint.ID);
end;
FreeAndNil(rcPoint);
After thinking - i need store myPoints and myLinks in memory - do changes - update DB.
Generics\Dynarrays\TSQLTableJSON or?
i think i find - need FillClose; or use TSQLTableJSON.
Plz sry for my bad english.
Pages: 1