GetDatabaseNames documentation
Posted: Wed 08 Nov 2017 15:23
I'm getting error when I try to use TCustomDAConnection.GetDatabaseNames in Firemonkey.
When using the GetDatabaseNames I get an "Unsupported metadata kind", however the GetTableNames does work and returns the number of tables in the Main db.
I didn't find online documentation, can you provide example of proper use of GetDatabaseNames?
Thanks
Neil
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