Code: Select all
var
DBlist:TStrings;
LTS:string;
begin
DBList:=TStringList.create;
try
CRTT.GetDatabaseNames(DBlist); //GetTableNames(DBlist,false,true);
if(DBlist.Count=1)
then begin
LTS := DBM.CRTT.Database;
LTS := leftstr(LTS,length(LTS)-3)+' - Data.db';
DBM.LiteSQL1.SQL.Clear;
DBM.LiteSQL1.SQL.Add('ATTACH DATABASE "'+LTS+'" as "LTS";');
DBM.LiteSQL1.Execute;
end;
finally
DBlist.Free;
end;
I didn't find online documentation, can you provide example of proper use of GetDatabaseNames?
Thanks
Neil