1]连接好数据库,并显示;(设计时的连接,和运行时的连接,是两个独立的连接,要区分开)

procedure TForm1.FormCreate(Sender: TObject);
begin
FDQuery1.Connection := FDConnection1;
FDConnection1.LoginPrompt:=false; //取消登录提示框
FDConnection1.Open('DriverID=SQLite;Database=test1.Sqlite3.db');
end;

  2]增加所有字段;

  3]添加事件;

 //    FDQuery1UserName: TWideMemoField;

procedure TForm1.FDQuery1UserNameGetText(Sender: TField; var Text: string;
  DisplayText: Boolean);
begin
Text := Copy(FDQuery1UserName.AsString, 1, 50);
end;

4]效果;