本文整理自网络,侵删。
function Tform1.GetAllUser: TStringList;begin Result := TStringList.Create; Result.Clear; with TADOQuery.Create(nil) do try Connection := FdbJbda; Close; SQL.Clear; SQL.Add('select name from data'); Open; while not Eof do begin Result.Add(Format('%s', [Fields[0].AsString])); Next; end; Close;
finally Free; end;end;
相关阅读 >>
Delphi 使用twebbrowser组件保存网页为html和mht文件
Delphi monthoftheyear、weekoftheyear、weekofthemonth、dayoftheyear … 相对时间
Delphi fdmemtable中如何在已有的字段数据集上加入字段
Delphi中combobox.items.indexof用法
更多相关阅读请进入《Delphi》频道 >>