通过网盘分享的文件:connectnion学习V41.rar
链接: https://pan.baidu.com/s/1EQuCyF3-RV1EOHs37nis4Q 提取码: xz8m

      listbox2.Items.Add(FDMetaInfoQuery1.FieldByName('COLUMN_NAME').AsString
      +''
      + FDMetaInfoQuery1.FieldByName('COLUMN_TYPENAME').AsString
      );
 

   Memo1.SelText := '.'
   + leftStr(
   listBox2.Items[listBox2.ItemIndex], pos('',listBox2.Items[listBox2.ItemIndex])-1
   );
  // Memo1.SelText := '.'+listBox2.Items[listBox2.ItemIndex] ;   //将 文本插入到Memo1
 

 原则,不使用第三方控件

 提升自身编程能力

===================更新日志.log=====================

23 --显示WideMemo内容--列名后添加||‘’
24设计视图窗口功能
25右键编辑菜单
26导出为CSV
27只提取前200 limit 200
28更改 默认背景色
29aaa.csv导入到cccc.db的ddd表.bat
30增加clean.bat清理单元
31解决database table is locked,LockingMode设为Normal
32PageUp上翻历史SQL语句,PageDown下翻历史SQL语句
33支持REGEXP正则函数
34点运行,保存历史SQL语句,隐藏 下拉列表
35解决表名有空格,表名为关键字table
36彻底显示列类型为TEXT里的WideMemo内容,Memo类型里Memo内容
37上面编辑栏,查找第一个,一定要 点两次

====================================================

 参考资料:关键部份

Listbox1拖动到右边Memo1指定位置https://prog.hu/tudastar/90383/drag-and-drop-tmemo

TMemo 关键字代码 着色    https://www.swissdelphicenter.ch/en/showcode.php?id=2150

https://www.experts-exchange.com/questions/21137398/Position-a-listbox-inside-a-memo-component.html

uniGUI类似 C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\SQLDemo

procedure TForm8.ListBox2KeyPress(Sender: TObject; var Key: Char);
begin
  if (key =#13) and ( listBox2.ItemIndex>-1) then  begin
   Memo1.SelText := '.'+listBox2.Items[listBox2.ItemIndex] ;   //将 文本插入到Memo1
   listbox2.Visible:=false;
   ListBox_keyWords.Visible:=false;
   memo1.SetFocus;
  end;
end;
procedure TForm8.Memo1KeyPress(Sender: TObject; var Key: Char);
var pt: TPOint; // Memo1 弹出listbox2的位置 //============= 弹出 ListBox2m 并获得 焦点=========== ================= GetCaretPos(pt); ListBox2.Top := Memo1.Top + pt.y +17; ListBox2.left := Memo1.Left+ pt.x +17; ListBox2.BringTofront; ListBox2.Visible:=True; if ListBox2.CanFocus then ListBox2.SetFocus; //=====================================================================
 FDConnection1.GetTableNames('', '', '', ListBox1.Items); //所有  表 名
    StringGrid1.RowCount := FDMetaInfoQuery1.RecordCount + 1; //所有 字段名
    i := 0;
    listbox2.Items.Clear;//下拉 字段名
    FDMetaInfoQuery1.First;
    while not FDMetaInfoQuery1.Eof do
    begin
      StringGrid1.Cells[1, i + 1] := FDMetaInfoQuery1.FieldByName('COLUMN_NAME').AsString; // '名';
      StringGrid1.Cells[2, i + 1] := FDMetaInfoQuery1.FieldByName('COLUMN_TYPENAME').AsString; // '值';

      listbox2.Items.Add(FDMetaInfoQuery1.FieldByName('COLUMN_NAME').AsString);
      FDMetaInfoQuery1.Next;
      i := i + 1;
    end;

表列 自动带出 。

关键字 自动补全