Jump to content

GreatDayDan

Members
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

0 Neutral

About GreatDayDan

  • Birthday 03/03/1952

Technical Information

  • Delphi-Version
    Delphi 10.2 Tokyo
  1. GreatDayDan

    Copy Sqlite DB to tethered app

    I have created a tethered app. The server needs to copy a Sqlite db and stream it to the client. I get the db with this code: procedure TfmxServer.actStreamTheDbExecute(Sender: TObject); var ms: TMemoryStream; begin ms := tmemorystream.Create; ms := dmplanner.GetDbAsStream; // get it from the datamodule ms.Position := 0; thrprofServer.SendStream(thrmanServer.RemoteProfiles.First, 'Stream_TheDB', ms); // send it to the client end; function TdmPlanner.GetDbAsStream: TMemoryStream; // datamodule var fs: TFilestream; ms: TMemoryStream; begin fs := tfilestream.Create(consqlite.Params.Values['Database'] , fmOpenRead); ms := tmemorystream.Create; try ms.loadfromstream(fs); // ms.size = 315392, file size = (315,392 bytes result := ms; // so I am getting the full db3 file. result.Position := 0; finally freeandnil(fs); freeandnil(ms); // does this kill the result? end; end; I catch the stream and to write the db with this code: procedure TfrmMobile_Client_Main.DoStreamTheDb( const Aresource: TremoteResource); var fs: TFilestream; ms: TMemoryStream; begin fs := tfilestream.Create (dmplannerclient.consqlite.Params.Values['Database'] , fmopenreadwrite or fmCreate); try ms := TMemoryStream.Create; ms := TMemoryStream(AResource.Value.AsStream); ms.Position := 0; // ms.size = 315392, so I got the whole file. ms.SaveToStream(fs); dmPlannerClient.FillLbx(lbxRecipeNames); // now fill a listbox, but when I open a query, I get // [FireDAC][Phys][SQLite] ERROR: unable to open database file. finally freeandnil(fs); freeandnil(ms); end; end; So my question is, How do I copy the db to the client and then use it on the client? Better yet, How do I an in-memory db instead of an on-disk db? I have tried setting the FDConnection filename to :memory: but that did not work. Delphi CE Rio 10.3.2 Thanks...Dan'l' +
  2. GreatDayDan

    FireDAC.Phys.FB causes e2597 in Android 28

    I was hoping that I could use the FB database. Bummer. Guess I will just have to migrate data and metadata to Sqlite or to MySql. BTW, which would be better, Sqlite or MySql?
  3. GreatDayDan

    FireDAC.Phys.FB causes e2597 in Android 28

    Well, the "experiment" failed on my PC. I installed FB 3. I get the same error. Bummer.
  4. GreatDayDan

    FireDAC.Phys.FB causes e2597 in Android 28

    Thanks
  5. I am porting a Win32 with FB app to Android. When the datamodule uses FireDAC.Phys.FB the Linker fails with [DCC Error] E2597 c:\\program files (x86)\\embarcadero\\studio\\20.0\\lib\\Android\\Release\libibtogo.a(fun.o): In function `FUN_evaluate': /builds/InterBase_ANDROID_TOGO_IB2017/super/jrd/fun.c:277: undefined reference to `abs' c:\\program files (x86)\\embarcadero\\studio\\20.0\\lib\\Android\\Release\libibtogo.a(fun.o): In function `FUN_resolve': /builds/InterBase_ANDROID_TOGO_IB2017/super/jrd/fun.c:947: undefined reference to `abs' Is this because Android does not support FB? Can I use Interbase? Is there a solution for this? Thanks...Dan'l
  6. GreatDayDan

    CE Tokyo and Rio and FastReport.

    That installed FR for XE7 & Tokyo CE, but not for Rio CE. Is there a Rio CE version of FR?
  7. m I have both Tokyo & Rio installed. I used GetIt PM to install FR VCL & FMX 5.6.17. The FMX components are installed but theVCl components are not. GetIt shows the Uninstall button. Click it and the uninstall fails. The design package list in Tokyo shows FR FRX 2.0 components at C:\Program Files (x86)\FastReports\FastReport FMX Embarcadero edition\LibD25\dclFMXfrx25.bpl. The C:\Program Files (x86)\FastReports\LibD21 folder has bpl files. The C:\Program Files (x86)\FastReports\LibD26 folder is empty. I have also uninstalled via the Control Panel. Uninstall failed. What do I need to do to get FR VCL CE 10.2.3 (Tokyo) and10.3 (Rio) to install? Thanks...Dan'l
  8. GreatDayDan

    Graphics32

    The simple fix: add the Source folder to the compiler path. That is what I missed. Thanks for all the help.
  9. GreatDayDan

    Graphics32

    I have checked out the code from GitHub, cloned the XE8 folder to XE10 and added the compiler code. The GR32_R.dpk compiles. The GR32_D.dpk errors with "required package GR32_R not found." requires designide, vcl, rtl, GR32_R; I have included the new XE10 folder in the path. What am I missing?
  10. GreatDayDan

    Graphics32

    Trying to use Graphics32 in Delphi CE. Anyone know how? I have tried the suggestions from here: https://www.experts-exchange.com/questions/28754439/Graphics32-under-Delphi-10-Seattle.html
  11. GreatDayDan

    "Network Unreachable" when tethering.

    My bad. Thanks.
  12. "Network Unreachable" when tethering.I am running the BDShoppingList project in "C:\Users\Public\Documents\Embarcadero\Studio\19.0\Samples\Object Pascal\RTL\Tethering\BDShoppingList"It runs well in Windows but when I run the Android target I get this exception.The exception is raised in this proc: procedure TTetheringNetworkServerCommUDP.BroadcastData(const AData: TBytes; const AHost: string; InitialPort, FinalPort: Integer); var I: Integer; LHost: string; begin if TTetheringAdapter.IsLoggingItem(TTetheringAdapter.TTetheringLogItem.Comm) then TLogAdapter.Log('** UDP ** BroadcastData to "' + AHost + '": "' + TEncoding.UTF8.GetString(AData) + '"'); if AHost = '' then begin if FIPVersion = TCommIPVersion.IP_IPv4 then LHost := '255.255.255.255' else LHost := '0:0:0:0:0:0:255.255.255.255'; for I := InitialPort to FinalPort do FUDPServer.Broadcast(AData, I, LHost) end else for I := InitialPort to FinalPort do FUDPServer.SendBuffer(AHost, I, AData); end; My understanding is that to look for tethered apps on my subnets I need to use DiscoverManagers(2000, '192.168.1.0') {timeout, use all my subnets}The LHost is being assigned (255.255.255.255). Shouldn't that be (255.255.255.0)? Using CE 10.2
×