B4J Question ABMaterial - ABMGenerator

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:

DonManfred

Expert
Licensed User
Longtime User
You should post B4J questions in the B4J Forum.
Edit: thread was already moved ;-)
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
where do I download it ?
it is part of the ABMaterial Library. One of the objects in there is the ABMGenerator.

From the ABMaterial.xml

B4X:
    <class>
        <name>com.ab.abmaterial.ABMGenerator</name>
        <shortname>ABMGenerator</shortname>
 
Upvote 0

Philip Chatzigeorgiadis

Active Member
Licensed User
Longtime 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).
 

Attachments

  • AMBGEN EXAMPLE.zip
    2.6 KB · Views: 355
Last edited:
Upvote 0

Philip Chatzigeorgiadis

Active Member
Licensed User
Longtime 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 ?
My ABMaterial app is connected to a SQL Server database. In the DBM.bas file:

B4X:
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.
 
Upvote 0
Top