05-02-2022, Saat: 16:47
Bu fonksiyonda yanlış olan nedir? Windows'ta hiç bir problem yok. Telefonda FDTableHighScores.Active bu satırda No Such Table HighScores hatası veriyor. Ne yaptıysam düzelmedi. Tpath.GetPublicPath yolunda dosya var görüyorum. Tabloda var. İçinde veri de var hepsini ben görebiliyorum. Telefon görmüyor.
Function TFrameHighScores.baglan : Boolean;
var
DB: string;
begin
DB := Tpath.GetPublicPath + Pathdelim + 'HighScores.s3db';
// Tfile.Delete(DB);
FireScoresList.DriverName := 'SQLite';
FireScoresList.Params.Values['Database'] := DB;
FireScoresList.Params.Values['CharacterSet'] := 'utf8';
if not FileExists(DB) then
begin
FireScoresList.ExecSQL('CREATE TABLE IF NOT EXISTS HighScores (Name TEXT NOT NULL, Score INTEGER)');
end;
FireScoresList.Connected := True;
if FireScoresList.Connected = True then
begin
FDTableHighScores.Connection := FireScoresList;
FDTableHighScores.TableName := 'HighScores';
FDTableHighScores.Active := True;
end;
Result := FireScoresList.Connected;
end;

