Перейти к содержанию
  • Регистрация

ksi

Пользователи
  • Публикаций

    8
  • Зарегистрирован

  • Посещение

Информация о ksi

  • Звание
    Новичок
  1. Dear Brovin Yaroslav For this great product (FGX component). I have a problem when using TFgActivityDialog in "Release Mode" in Delphi 10.3 Rio. I can not save my record in my PlayStore, it can save record into MySQL Server. What should i do to make mycode work in "Release mode" (playStore)? Please help me ... Here is the code i wrote: procedure TLocationForm.btnSendClick (Sender: TObject); begin with dmMyLocation do begin if not fgActivityDialog.IsShown then begin FActivityDialogThread: = TThread.CreateAnonymousThread (procedure begin try TThread.Synchronize (nil, procedure begin fgActivityDialog.Message: = 'Please, Wait'; fgActivityDialog.Show; end); Sleep ( 1000); if TThread.CheckTerminated then Exit; TThread.Synchronize (nil, procedure begin fgActivityDialog.Message: = 'Sending data ...'; qInsert.SQL.Clear; qInsert.SQL.Add ('INSERT INTO mabsensilokasi ('); qInsert.SQL.Add ('idlokasi,'); qInsert.SQL.Add ('tgllokasi,'); qInsert.SQL.Add ('latx,'); qInsert.SQL.Add ('longx,'); qInsert.SQL.Add ('latlongx,'); qInsert.SQL.Add ('namalokasi)'); qInsert.SQL.Add ('VALUES ('); qInsert.SQL.Add (': idlokasi,'); qInsert.SQL.Add (': tgllokasi,'); qInsert.SQL.Add (': latx,') ; qInsert.SQL.Add (': longx,'); qInsert.SQL.Add (': latlongx,' ); qInsert.SQL.Add (': namalokasi)'); qInsert.Prepare; qInsert.Params [0] .AsInteger: = 0; qInsert.Params [1] .AsDateTime: = Now; qInsert.Params [2] .AsFloat: = strToFloat (ENUSLat); qInsert.Params [3] .AsFloat: = strToFloat (ENUSLong); qInsert.Params [4] .AsString: = ENUSLat + ':' + ENUSLong; qInsert.Params [5] .AsString: = edtNamaLokasi.Text; try UniConnection1.Connect; qInsert.ExecSQL; ShowMessage ('Record was save into MySQL Server DB ...'); // showup windows of dialog when data was saved succesfully into db mysql server except on e: exception do begin ShowMessage (e.Message); UniConnection1.Disconnect; end; // exception end; // try //fgActivityDialog.ExecuteAction (btnSend); end); Sleep (1000); if TThread. CheckTerfeed then Exit; TThread.Synchronize (nil, procedure begin fgActivityDialog.Message: = 'Finish'; end); Sleep (500); if TThread. CheckTerfeed then Exit; finally if not TThread.CheckTerminated then TThread.Synchronize (nil, procedure begin fgActivityDialog.Hide; end); end; // try end); // FActivityDialogThread FActivityDialogThread.FreeOnTerminate: = False; FActivityDialogThread.Start; end; // if end; // endDM end; // endProc
  2. Dear IVGSoft The problem found...it was about the floating value in myLatitude field that detect as a string... Thanks in advanced for your help !
  3. Dear IVGSoft I have tried the code you suggested but the result is the same as before. In Development Mode (Debug) the code works well but when i change the application to Release Mode (Application Store) the code did not work well (data can not save into database MySQL Server). Meanwhile the code in debug mode and release mode is the same. Whould you please help me to solve it? Thank you very much for your help!
  4. Dear IVGSoft, I would like to thank you very much for your help...and i will try it now...and let me inform you the result please!
  5. UniConnction1 has property AutoCommit that has value default for TRUE. So i think the problem is not here!
  6. Dear Brovin Yaroslav First of all I would like to thank you for this great product (FGX component). I have a problem when using TFgActivityDialog in "Release Mode" in Delphi 10.3 Rio. When i deploy my Android Application in PlayStore, the application can not save record into mySQL Server, meanwhile in "Debug Mode" (Developement) it can save record into MySQL Server. What should i do to make mycode work in "Release mode" (playStore)? Please help me... Here is the code i wrote: procedure TLocationForm.btnSendClick(Sender: TObject); begin with dmMyLocation do begin if not fgActivityDialog.IsShown then begin FActivityDialogThread := TThread.CreateAnonymousThread(procedure begin try TThread.Synchronize(nil, procedure begin fgActivityDialog.Message := 'Please, Wait'; fgActivityDialog.Show; end); Sleep(1000); if TThread.CheckTerminated then Exit; TThread.Synchronize(nil, procedure begin fgActivityDialog.Message := 'Sending data...'; qInsert.SQL.Clear; qInsert.SQL.Add('INSERT INTO mabsensilokasi('); qInsert.SQL.Add('idlokasi,'); qInsert.SQL.Add('tgllokasi,'); qInsert.SQL.Add('latx,'); qInsert.SQL.Add('longx,'); qInsert.SQL.Add('latlongx,'); qInsert.SQL.Add('namalokasi) '); qInsert.SQL.Add('VALUES('); qInsert.SQL.Add(':idlokasi,'); qInsert.SQL.Add(':tgllokasi,'); qInsert.SQL.Add(':latx,'); qInsert.SQL.Add(':longx,'); qInsert.SQL.Add(':latlongx,'); qInsert.SQL.Add(':namalokasi)'); qInsert.Prepare; qInsert.Params[0].AsInteger := 0; qInsert.Params[1].AsDateTime := Now; qInsert.Params[2].AsFloat := strToFloat(ENUSLat); qInsert.Params[3].AsFloat := strToFloat(ENUSLong); qInsert.Params[4].AsString := ENUSLat+':'+ENUSLong; qInsert.Params[5].AsString := edtNamaLokasi.Text; try UniConnection1.Connect; qInsert.ExecSQL; ShowMessage('Record was save into MySQL Server DB...'); //showup windows of dialog when data was save succesfully into db mysql server except on e:exception do begin ShowMessage(e.Message); UniConnection1.Disconnect; end;//exception end;//try //fgActivityDialog.ExecuteAction(btnSend); end); Sleep(1000); if TThread.CheckTerminated then Exit; TThread.Synchronize(nil, procedure begin fgActivityDialog.Message := 'Finish'; end); Sleep(500); if TThread.CheckTerminated then Exit; finally if not TThread.CheckTerminated then TThread.Synchronize(nil, procedure begin fgActivityDialog.Hide; end); end;//try end);//FActivityDialogThread FActivityDialogThread.FreeOnTerminate := False; FActivityDialogThread.Start; end;//if end;//endDM end;//endProc
×
×
  • Создать...