B4J Tutorial jRDC2 client example (using modded jRDC2)

Discussion in 'B4J Tutorials' started by OliverA, Oct 31, 2017.

  1. OliverA

    OliverA Well-Known Member Licensed User

    Attached you find an example of accessing a jRDC2 server. This is a conversion of the DBUtils example program (here: https://www.b4x.com/android/forum/threads/dbutils-example.34611/#content). Please use the modded jRDC2 server (here: https://www.b4x.com/android/forum/threads/modded-jrdc2-w-sqlite-support-and-more.85578/). I used this client to do some "smoke" testing and remove some uncaught exceptions errors that I triggered in the original jRDC2 code (here: https://www.b4x.com/android/forum/t...ation-of-rdc-remote-database-connector.61801/). Please note that I create a "helper" code module jRDC2Utils that encapsulates some of the jRDC2 communication. This may not be the way to go, but it seems to work. I do seem to have some issues with events and order of events (one is documented in the source, the end of the AppStart method). For now it shows a small glimpse of jRDC2.

    2018/05/16 Update: Updated client application to use newer bjl layout file instead of older fxml format.
     

    Attached Files:

    Last edited: May 16, 2018 at 3:36 PM
    Diceman and Erel like this.
  2. Diceman

    Diceman Member Licensed User

    I downloaded your zip file and loaded it using B4J v6.01.
    When I ran the Designer I get an out of memory error. This hasn't happened before with any other project. Can you check the form to see if has been corrupted?
    (I downloaded the file twice and I get the out of memory error each time.) jRDC2v2_Client_B4j_Designer_Bug.png

    TIA
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    This error happens when you try to load an old FXML layout file with the internal designer.

    This example is not based on the latest version of jRDC2. It doesn't use the recommended approach which is explained in the tutorial.
     
    Last edited: May 16, 2018 at 2:33 PM
  4. OliverA

    OliverA Well-Known Member Licensed User

    Yeah that's because I'm not that great with UI designs and was just using what was given with the DBUtils example that I found.
    I'll take a look at it and see if I can recreate the UI to make it work with a more up to date B4J.
    True, but I think the only thing that is missing of the modded JRDC is the datetime capability.
    Huh? I'm using wait for and I create a new DBRequestManager for each request. I just wrap this up in some helper methods. What's wrong with that? I'm just asking, since if I'm doing something wrong on the JRDC side, I need to fix it.
     
    Erel likes this.
  5. Erel

    Erel Administrator Staff Member Licensed User

    My mistake. Sorry. I took a quick look and thought that it is based on an older version of jRDC2 (most examples with FXML layouts are very old).
     
  6. OliverA

    OliverA Well-Known Member Licensed User

    Fixed. Download file in post#1 has been updated. Note that this update only affects the layout file. No new functionality has been added.
     
    Erel and Diceman like this.
Loading...