iOS Question Problems with database view

toro1950

Active Member
Licensed User
I have two identical Apps, one Android and one iOS, which have a customer database. The database is made up of only 4 fields, on the Android version I have no problems, I tested it up to 7000 records even if it will reach a maximum of 5000 records. on the iOS version the app can correctly display a database with a maximum of 2400 records, if the records are higher the app shows them regularly for a few moments then exits. this is my code that matches both systems
B4X:
private Sub updateclienti
    listacl.Clear
    n=0
    Dim Query As String
    Dim ResultSet1 As ResultSet
    SQL1.Initialize(SQLDataBasePath, nomedbcl, True)
    Query = "SELECT * FROM clienti"
    ResultSet1 = SQL1.ExecQuery("select * from clienti")

    Do While ResultSet1.NextRow
        n=n+1
        Dim p As B4XView = xui.CreatePanel("")
        p.SetLayoutAnimated(0, 0, 0, listacl.AsView.Width, 30dip)
                
        p.LoadLayout("itemcl")
                        
        label1.Text= ResultSet1.GetString("nome")
        label2.Text =  ResultSet1.GetString("danapet")
        label3.Text= ResultSet1.GetString("cell")
        label4.Text= ResultSet1.GetString("idcl")
        listacl.Add(p, Null)
    Loop
    label16.Text= n
    ResultSet1.Close

End Sub
what could it be? has anyone had the same problems? What do you advise me to do to identify the error that seems strange to me, from 0 to 2400 records there are no problems
 

aeric

Expert
Licensed User
Longtime User
For a long list of items, it is recommended to use lazy loading or preoptimized CLV.

 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…