uses
System.IOUtils; //TPath用到的单元
procedure TMainFrm.btn2Click(Sender: TObject);
var
SQL,PathStr: string;
List : TStrings;
I: Integer;
begin
List := TStringList.Create;
PathStr:= TPath.Combine(Tpath.GetDocumentsPath,'Test.DB');
with conPub do
begin
Params.DriverID := 'SQLite';
Params.Database := PathStr;
LoginPrompt := False;
Connected := True;
//SQL := 'CREATE TABLE "TestTable" ("id" INTEGER NOT NULL,"ConfigId" integer,"comboxIndex" integer,PRIMARY KEY ("id"));';
//ExecSQL(SQL);
end;
conPub.GetFieldNames('', '', 'TestTable', '', List);
for I := 0 to List.Count-1 do
begin
lv1.Items.Add.Text := List[i];
end;
conPub.GetTableNames('','','',lst1.Items, [osMy], [tkTable]);
List.Free;
end;
Delphi android 连接Sqlite
最新推荐文章于 2024-06-19 08:38:03 发布