0
I am creating an Android application in delphiXE7 and everything works until I will create dynamically the datamodule. Then it hangs and does not come back.
procedure TForm1.Btn1Click(Sender: TObject);
var M:TModalResult;
begin
Application.CreateForm(TDataModule1, DataModule1);
end;
I had to make this dynamic create because before, when it automatically created the application only got a black screen and did not start.
Remembering that you don’t even execute this code in the Tfdconnection Beforeconnection;
{$IF DEFINED (IOS) || (ANDROID)}
DataModule1.Conn1.Params.Values['DriverID'] := 'SQLite';
try
DataModule2.Conn1.Params.Values['Database']:= TPath.Combine(TPath.GetDocumentsPath, 'Banco002.SQLite');
DataModule2.Conn1.Connected := True;
except on E: Exception do
begin
raise Exception.Create('Erro de conexão com o banco de dados!');
end;
{$ENDIF}
Has anyone ever had a problem? Usage Xe7, sqlite, Android 4.2 Samsung DUOS Smartphone and SDK updated.
Pq you do not put the Datamodule in the project’s autocreate and connect it to the database via the Datamodule Create. One question, this extension of the right Sqllite?... wouldn’t it be Banco002.db
– Jefferson Rudolf
I saved with the Sqllite extension to differ from old verses I was using.
– Ricardo da Rocha Vitor