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.