Gary 18 Posted December 25, 2023 Hello all, How do you test if a FDConnection using SQLite is connected to an actual Database? If I drop a FDConnection on a form, set it's DriverName SQLite, leave the Params->Database property empty and connect there is no error. This code shows the "Connected' Message procedure TForm1.Button1Click(Sender: TObject); begin if FDConnection1.Connected then ShowMessage('Connected'); end; Share this post Link to post
Navid Madani 1 Posted January 2 (edited) Check the Params TStrings property to check for the database name and other properties. procedure TForm1.Button1Click(Sender: TObject); begin if FDConnection1.Params.Values['Database'] <> '' then ShowMessage('Database name is ' + FDConnection1.Params.Values['Database']); end; Edited January 2 by Navid Madani Share this post Link to post