Access to database
Posted: Mon 06 Dec 2021 15:37
I created a database with a default TFDConnection (no encryption) the following way.
How can I open this database by using TLiteConnection?
FDConnection1.Connected := False;
FDConnection1.Params.Database := 'testdatabase.db';
FDConnection1.Params.UserName := 'username';
FDConnection1.Params.Password := 'password';
FDConnection1.Connected := True;
when I try it this way:
LiteConnection1.Disconnect;
LiteConnection1.Database:= 'testdatabase.db';
LiteConnection1.Username:= 'username';
LiteConnection1.Password:= 'password';
LiteConnection1.Connect;
I am getting a message " File is not a database"
How can I open this database by using TLiteConnection?
FDConnection1.Connected := False;
FDConnection1.Params.Database := 'testdatabase.db';
FDConnection1.Params.UserName := 'username';
FDConnection1.Params.Password := 'password';
FDConnection1.Connected := True;
when I try it this way:
LiteConnection1.Disconnect;
LiteConnection1.Database:= 'testdatabase.db';
LiteConnection1.Username:= 'username';
LiteConnection1.Password:= 'password';
LiteConnection1.Connect;
I am getting a message " File is not a database"