You are not logged in.
Pages: 1
Hi there,
I got a simple question and cannot find the answer in the samples.
I got an class that inherit TSQLRecord and TSQLRestServerDB. I do everything as in the 02 - Embedded SQLite3 ORM sample, anyway now i want load the data from the sqlite3 file (its created). An here is the problem i use the method RetrieveList wich retrieves me some records but all of them are empty (only the headers of TSQLRecord are saved or assigned somewhere).
Cannot get it to load data from the TSQLRestServerDB.
Any hints? I tried FillPrepare, FillRow, FillOne no success.
Best Regards,
LB.
Offline
Some code would be useful
Offline
FModel := TSQLModel.Create([TEntryDb]);
FDatabase := TSQLRestServerDB.Create(FModel, AFilename);
TSQLRestServerDB(FDatabase).CreateMissingTables(0);
FList := TSQLRestServerDB(FDatabase).RetrieveList(TEntryDb, nil, []);
Hm, nothing special same code like in sample 2. I did add the records like in the sample 02.
Offline
Why not access it this way?
var
Entries: TEntryDB;
Entries := TEntryDB.CreateAndFillPrepare(FDatabase, yourQueryHere);
while Entries.FillOne do
begin
Display(Entries.SomeProperty);
end;
Offline
Hm, I just saw that FDatabase.Add doesnt add any fields to it... Anyway, should i do something more than just inherit from TSQLRecord and make published properties so they should be visible as fields?
ps. Thats quite strange, because the sample works as expected - but not mine..
ps2. I did find out, that my model TSQLTest = class(TSQLRecord) doesnt have any fields, just an ID. Solved: I did have the fields in the public section of the class not published... Omg.
Last edited by GetCoffee (2014-09-20 20:02:26)
Offline
Pages: 1