B4J Library [B4X] MiniORMUtils

aeric

Expert
Licensed User
Longtime User
Testing this version 3 on MiniORM B4X template but getting error when creating database using ExecuteBatch.
Not sure why it used to work but not now.
I will use a different approach to solve this issue instead of troubleshooting the root cause.
 

aeric

Expert
Licensed User
Longtime User
Testing this version 3 on MiniORM B4X template but getting error when creating database using ExecuteBatch.
Not sure why it used to work but not now.
I will use a different approach to solve this issue instead of troubleshooting the root cause.

Found the issue.
I can't use DBParameters straight away. This can cause an issue of pass by reference.

B4X:
Public Sub AddNonQueryToBatch
    Dim paramsize As Int = ParametersCount
    Dim Args(paramsize) As Object
    Dim i As Int
    For Each Param In DBParameters
        Args(i) = Param
        i = i + 1
    Next
    DBSQL.AddNonQueryToBatch(DBStatement, Args)
    'DBSQL.AddNonQueryToBatch(DBStatement, DBParameters) ' Wrong
End Sub
 

aeric

Expert
Licensed User
Longtime User
Have you ever working with SQLite BLOB in B4i, B4A or B4J?


Next version will support BLOB.
 

aeric

Expert
Licensed User
Longtime User
Version: 3.30
Size: 14KB

Another major update!

What's New

1. BLOB column is now supported
2. ColumnsType property is added as Map of column name (or alias) as key and column type as value.
3. Specifying the ColumnsType is highly recommended especially when working with BLOB. It will fail in B4A if attempt to convert BLOB to String.
4. Parameters variable is now array of Object. It is no longer a List in B4J nor array of String in B4A and B4i.
5. Most subs are affected by #4 and updated
6. Query sub updated
7. DBUtils and JSON libraries are no longer required for B4A and B4i. These libraries have been removed in manifest.txt
8. First property is not returning a default Map
9. Execute2 sub added
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…