本文整理自网络,侵删。
var Form1: TForm1;
implementation
{$R *.fmx}
procedure TForm1.Button1Click(Sender: TObject);begin // Populate Manufacturer box SQLConnection1.Connected := True; SQLQuery1.SQL.Clear; SQLQuery1.Close; SQLQuery1.SQL.Add('SELECT DISTINCT manufacturer FROM cars'); try SQLQuery1.Open; cbManufac.Items.Clear; while not SQLQuery1.Eof do begin cbManufac.Items.Add(SQLQuery1.Fields[0].AsString); SQLQuery1.Next; end; finally SQLQuery1.Close; end;end;
procedure TForm1.SQLConnection1BeforeConnect(Sender: TObject);begin {$IF DEFINED(iOS) or DEFINED(ANDROID)} SQLConnection1.Params.Values['ColumnMetadataSupported'] := 'False'; SQLConnection1.Params.Values['Database'] := TPath.Combine(TPath.GetSharedDocumentsPath, 'cars.sqlite'); {$ENDIF}end;end.
相关阅读 >>
关于Delphi xe5 firemonkey 手机屏幕自适应程序问题
Delphi winapi: writeprivateprofilestring、getprivateprofilestring - 简单读写 ini 文件
Delphi mediaplayer android 下播放 mp4 的问题
Delphi 过卡巴2009和沙盘启发杀毒的Delphi源代码
更多相关阅读请进入《Delphi》频道 >>