Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Dual Databases??

edited December 2016 in End User
Hi Team,

I have a Customer with a MySQL database at HQ.

He wants his satelite offices to be able to interrogate the data via the internet but no write access. Thus the
normal rbXXXX files cannot exist on his server.

My immediate thought is to use something like DBISAM for 'local' rbXXXX files/data whilst somehow still interrogating
the Main MySQL DB.

Is this doable??? If so, how would I structure the end-User example?

Regards & TIA,
Ian

Comments

  • edited December 2016
    Hi Ian,

    Yes, you can..

    - use DBISAM datasets to connect to the rbXXXX tables.

    - configure the Designer.DataSettings to connect to the mySQL data.


    Best regards,

    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited December 2016
    Tks Nard. Cheers.
  • edited December 2016
    Hi Nard,

    Perhaps a compatability issue.. Win 10, D10 Berlin, latest RB. Wanting to use MyDAC for mySQL.

    To simplify the rbXXXx side I started with the DBISAM End User example. Compiled and tested OK.

    I then deleted the dbisam dbData component and added a MyDAC TmyConnection. Configured the connection and it connects
    to the remote DB OK.

    What I can't do is get the Designer to recognise the TmyConnection.

    Have I missed something or is the MyDAC stuff not compatible?

    I did have a quick look at the MySQL dbExpress examply but I get a whole lot of "DBX Error: Driver could not be
    properly initialized. Client library may be missing, not installed properly, of the wrong version, or the driver may be
    missing from the system path." errors when loading the project to Delphi.

    Don't know anything about DBExpress so I have no idea what is actually missing.

    Regards,
    Ian
  • edited December 2016
    Tried the MicroOLAP DAC for mySQL as well. Same result.
    DBISAM side is fine. Can't get the Designer to recognise it. It is connecting OK as I have a DBGrid and Navigator
    connected via a Query/DataSource to the DAC.
    It all compiles & runs but when I create a new report|Data|File|Data Settings there is nothing there.
    If I then click on Session type I see 'DBISAMSession'.
    I can set the three fields Session Type, Database Name & Database Type for the support tables but that won't cut it..;-)

    Regards,
    Ian
  • edited December 2016
    Some progress..
    Went back to using the DevArt components..
    Have daDBISAM & daMyDAC built & loaded.
    Have the Designer recognising the DatabaseName (dbData), DatabaseType (dtMySQL) and SessionType (MyDACSession).
    I have Collation set at ctANSI.
    All connects & compiles but when I go to set the data for a new report, no sign of the mySQL side, or now for the
    DBISAM side.
    Frustrating..

    Ian
  • edited December 2016
    Success!!
    Don't know why. Aside from shutting down and restarting, changed nothing from the last entry.

    Happy Vegemite now...:-)

    Regards,
    ian
  • edited December 2016
    Hi Ian,

    A couple of comments:

    1. The Delphi FireDAC data access components provide a good solution. The
    Demos\EndUser Databses]MySQL folder includes a FiredDac example. (Delphi
    FireDAC had been very well received and replaces dbExpress and BDE).

    2. For any solution, you need a DADE plug-in. The DADE plug-in will register
    a SessionType, such as FireDACSession, ADOSession, etc. At Delphi
    design-time this requires installing packages. For run-time this requires
    including the unit in the 'uses' clause. For example daFireDAC, daADO, etc.

    3. At Delphi design-time, you can access the Designer Data workspace and
    select File | DataSettings to configure the SessionType, DatabaseName, etc.
    If you do not see the SessionType, then the package is not loaded.

    The latest Delphi IDE's have optimized package loading, which can cause the
    package to not be loaded. The solution is shown in the DBISAM plug-in
    source. The daDBISAMReg.pas unit has a delphi Register procedure with a call
    like this

    ForceDemandLoadState(dlDisable);

    The dclRBISAMxxyy package includes the daDBISAMReg unit. There is a separate
    run-time package, called rbISAMxxyy that contains the daDBISAM unit.


    4. For run-time, you need to configure the TppDesigner.DataSettings
    properties for SessionType, DatabaseName, ... And as mentioned above, add
    the appropriate DADE plug-in unit reference to the 'uses'.





    Best regards,

    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.