B4J Question ABMaterial - ABMGenerator

Discussion in 'B4J Questions' started by Bothwell, Jul 25, 2019.

  1. Bothwell

    Bothwell Member Licensed User

    I am trying to get my head around ABMaterial and I see a few posts that talk about ABMGenerator. may I ask how do you get to "Generate" any code with it ? is it a stand alone program ? where do I download it ? does it work like ABMGridBuilder which is in the ABMaterial ? download I am reading Lesson 5 - ABMGenerator (Part A) but I cant seem to understand
     
    Last edited: Jul 25, 2019
  2. DonManfred

    DonManfred Expert Licensed User

    You should post B4J questions in the B4J Forum.
    Edit: thread was already moved ;-)
     
    Last edited: Jul 25, 2019
    Bothwell likes this.
  3. DonManfred

    DonManfred Expert Licensed User

    it is part of the ABMaterial Library. One of the objects in there is the ABMGenerator.

    From the ABMaterial.xml

    Code:
    <class>
            <name>com.ab.abmaterial.ABMGenerator</name>
            <shortname>ABMGenerator</shortname>
     
    Bothwell likes this.
  4. Philip Chatzigeorgiadis

    Philip Chatzigeorgiadis Member Licensed User

    ABMGenerator is already included in ABM, so you do not need to download anything extra.


    To use it, you must create a new program, where you specify parameters for the data you want to manipulate (CRUD) and (if necessary) for the ABMTable where they will be displayed.
    Then, you execute the program and it produces the code, which you then paste to your ABMaterial webapp program.
    A good example can be found here: http://prd.one-two.com:51042/demo/HelperGeneratorPage/abmaterial-generator.html (although this link does not have the info about ABMTable definitions).

    Attached is one of my programs, which you can use as an example (some strings are in Greek language, but I think that the use of parameters is self explanatory).
     

    Attached Files:

    Last edited: Jul 25, 2019
    José J. Aguilar likes this.
  5. Bothwell

    Bothwell Member Licensed User

    Thanks Philip, let me work with that
     
  6. Harris

    Harris Well-Known Member Licensed User

  7. Bothwell

    Bothwell Member Licensed User

    sorry for new question, I am following that learning path I can connect to MySQL server but not MariaDB. am I correct that only sqlite3 and MySQL are currently supported ?
     
  8. Philip Chatzigeorgiadis

    Philip Chatzigeorgiadis Member Licensed User

    My ABMaterial app is connected to a SQL Server database. In the DBM.bas file:

    Code:
    Sub InitializeSQLServer(login As String, password As String, poolSize As Int)
    '    Log("init SQL Server")
        UsePool = True
       
        
    Try
           pool.Initialize(
    "com.microsoft.sqlserver.jdbc.SQLServerDriver""jdbc:sqlserver://10.0.0.10:1433;databaseName=STREAM", login, password)
        
    Catch
           
    Log("Last Pool Init Except: "&LastException.Message)
        
    End Try

       
    ' change pool size...
        Dim jo As JavaObject = pool
        jo.RunMethod(
    "setMaxPoolSize"Array(poolSize))   
    End Sub
    You should make your own Subroutine to initialize the MariaDB (pool.Initialize) using the appropriate driver for MariaDB.
     
    Bothwell and DonManfred like this.
  9. Bothwell

    Bothwell Member Licensed User

    great thanks again Philip.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice