You are not logged in.
Pages: 1
anzhi wrote:i found the "hello" field value only display the first letter, this is why?
Please tell us the Delphi and mORMot version you are using.
I test it with above code using Lazarus2.2.6 and mormot2,but it do not work!
I also test it with SqlQuery, SQLlite3Connection , it works, the code as follows
procedure TFmUser.LoadDataFromSQL;
begin
SQLQuery1.Close;
SQLQuery1.SQL.Clear;
SQLQuery1.SQL.Text:= 'SELECT * from user';
DBGrid1.Options := DBGrid1.Options + [dgDisplayMemoText];
SQLQuery1.Open;
end;
thanks
thanks very much, i trying to test it as above code, but i found some question,
the database which i select is sqlite, the data record as follow:
------------------------------------
| Name | Desc |
-------------------------------------
| 1 | hello |
but the DBGrid display data as follow
------------------------------------
| Name | Desc |
-------------------------------------
| 1 | h |
i found the "hello" field value only display the first letter, this is why?
thanks!
thanks very much!
i try to test it with json data , it work !
i try to test it by using TOrmTableToGrid, it also work !
procedure TFmUser.LoadDataFromGrid;
var
fTable: TOrmTable;
fGrid : TOrmTableToGrid;
DGrid: TDrawGrid;
begin
Model := CreateUserModel;
DGrid := TDrawGrid.Create(Self);
DGrid.Parent := Panel6;
Client := TDBClient.Create(Model, nil, 'lh.db', TRestServerDB, false, '');
Client.Server.Server.CreateMissingTables;
fTable := Client.MultiFieldValues(TOrmUser, 'Name,Desc');
fGrid := TOrmTableToGrid.Create(DGrid, fTable, nil);
But it did not work with dbgrid which DataSource.Dataset has data records, i guess whether the Client.MultiFieldValues result has some show question
I am trying to use DBgrid to display Mormot query result, but DBgrid Component not show data records ,the code is as follows:
fTable := Client.MultiFieldValues(TOrmUser, 'Name,Desc');
DataSource := TDataSource.Create(Self);
fDataSet := TOrmTableDataSet.Create(Self, fTable);
DataSource.DataSet := fDataSet;
DBGrid1.DataSource := DataSource;
the reason is why , how to fix?
Pages: 1