I'm creating an Android application in delphiXE7 and everything works until I'm going to dynamically create the datamodule. Then he hangs up and does not come back.
procedure TForm1.Btn1Click(Sender: TObject);
var M:TModalResult;
begin
Application.CreateForm(TDataModule1, DataModule1);
end;
I had to do this dynamic create because before, when it automatically created the application it only got a black screen and did not start.
Remembering that you can not even execute this code in the BeforeConnection of TFDConnection;
{$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 this problem? Use delphi Xe7, sqlite, Android 4.2 Samsung DUOS Smartphone and updated SDK.