B4J Question Library

Mikelgiles

Active Member
Licensed User
Longtime User
Is there a overview of what may be in all of the many libraries available? I assume that FX is the only one included in the IDE? Where do I find the best place to get familiar with what is in the libraries?

Is there a description of what is available in the FX library? I see a lot of very detailed information but not too many of them have a description of what they do.

I am mainly interested in what is available that is not available in VB6 or what is available that is an improvement over VB6.

I have been using VB6 for a long time and am very new to B4J. I am a licensed user of B4A and am planning on developing the same app in B4J and B4A.
 

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
Hello!
I suppose you were already introduced to the beginners guide.
https://www.b4x.com/android/forum/threads/begginners-guide.52589/

The FX library is not the only one in the IDE, I am too young to know about VB6 i only know VB.NET but more or less the main difference is that you will not have access to DLL libraries with B4J (only as an advanced user) beyond that almost everything is an improvement.

I believe that it would be better for you to indicate what you want to do specifically and see if it is available.
 
Upvote 0

Mikelgiles

Active Member
Licensed User
Longtime User
Hello!
I suppose you were already introduced to the beginners guide.
https://www.b4x.com/android/forum/threads/begginners-guide.52589/

The FX library is not the only one in the IDE, I am too young to know about VB6 i only know VB.NET but more or less the main difference is that you will not have access to DLL libraries with B4J (only as an advanced user) beyond that almost everything is an improvement.

I believe that it would be better for you to indicate what you want to do specifically and see if it is available.


Yes, I have been through the beginners guide. What I want to start with is to replace a app I am working on in VB6. This app reads a csv downloaded file and uses the new records in a detail view in one window and a master item view in another window. At one time I was downloading the csv file into a Access database and using sql to get what I want and insert into a grid. Two problems on doing that is the extra overhead for Access and a lot of code to load the two grids. The grid is a third party ( SharpGrid by Data Dynamics and has been discontinued) because it does a lot of things that msFlexGrid wont do easily.

Currently I am playing around with using the third party grid which will load and save the entire grid into a csv file with one line of code. One of the grids will normally need a grid of less than 100 rows and 20 columns so the process works perfectly on that one. The detail file will probably have 5000 to 10000 rows or 9 columns but only a small percentage of those records will be showing in the detail window. All of the detail records are in the 3rd party grid which has a very quick filter to only show the detail items belonging to the master item in the other grid.

I would like to get off of VB6 but more than that I need to get off of the discontinued 3rd party grid. For a while after i was discontinued all was OK because there was a forum that could offer help. Now the forum has been removed so no help whatsoever. I need to learn what capabilities are available in B4J so I can decide if there is a grid that will do what I need, what is the best way to store the data, and how simple will the coding be. I dont think a SQL server is a option but SQLite might be. Using the csv file works pretty well with the 3rd party grid but I need to get rid if it. One of the reasons for looking at B4J is that I also want to be able to use B4A and B4I apps also.
 
Upvote 0

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
let us see.

You will not find a complex grid like SharpGrid, there is one in vb net called Janus grid ex but it will have the same fate as the sharpgrid in the very near future. you could use the Tableview

Loading a CSV is quite easy:

B4X:
    Dim su As StringUtils
    Dim csvRecords As List = su.LoadCSV(File.DirAssets,"Test.csv",",")
 
    For i = 0 To csvRecords.Size -1
        Dim csvRecord() As String = csvRecords.Get(i)
        Log(csvRecord(0)) ' For column 0
    Next

and putting that information in the tableview is only one more line:

B4X:
tw.items.addALL(csvRecords)

If SQL SERVER is not an option you still can do: MySQL and MariaDB if you like file databases then SQLite is yout best bet but if you requiere an Access database then it is also posible but with some more lines of code.

To take information from a database:

B4X:
    Dim sql1 As SQL
    sql1.Initialize("","") ' Information about the database and the driver
    Dim query As String = "SELECT * FROM table1 WHERE column0 = 2"
    Dim cur As ResultSet = sql1.ExecQuery(query)
    Dim SQLToList As List
    SQLToList.Initialize
    Do While cur.NextRow
        Dim values(cur.ColumnCount) As String
        For col = 0 To cur.ColumnCount - 1
            Log(cur.GetString2(0))
        Next
        SQLToList.Add(values)
    Loop

To add the SQLToList to the tableview is the same as with the CSV file.

If you need more examples or more specific ones feel free to ask!
 
Upvote 0
Top