Hi!
I am creating a table , view table with Table module, from a SQLite table for records.
My problem is that the sqlite table has 46 records but when I load the records just can I see 44 , the two lost records doesnt show in table view.
The code that I use to load the records from Sqlite table
Any cluees?
I am creating a table , view table with Table module, from a SQLite table for records.
My problem is that the sqlite table has 46 records but when I load the records just can I see 44 , the two lost records doesnt show in table view.
The code that I use to load the records from Sqlite table
B4X:
If TableDefectos.IsInitialized = False Then
TableDefectos.Initialize(Me, "TableDefectos", 6)
TableDefectos.AddToActivity(PanelDefectos, 0, 2%y, 100%x, 70%y)
Else
TableDefectos.ClearAll
End If
TableDefectos.SetHeader(Array As String("#","Descripcion","Valor","Grado","Origen","Cant"))
'
'Agregando a la tabla
Dim Cursor1 As Cursor
Dim Fld(6) As String
Msgbox(Main.SQL.ExecQuerySingleResult("SELECT count(*) from t_defectos"),"Aviso")
Cursor1=Main.SQL.ExecQuery("select * from t_defectos")
'
Log("Qty Records" & Cursor1.RowCount)
For i=0 To Cursor1.RowCount - 5
Cursor1.Position=i
Fld(0)=Cursor1.GetInt("f_id")
Fld(1)=Cursor1.GetString("f_descripcion")
Fld(2)=Cursor1.GetString("f_valor")
Fld(3)=Cursor1.GetInt("f_grado")
Fld(4)=Cursor1.GetInt("f_origen")
Fld(5)=Cursor1.GetInt("f_cantidad")
'==========================CREANDO UNA LINEA EN LA TABLA VISTA======================
'Agregando a la tabla
TableDefectos.AddRow(Array As String(Fld(0),Fld(1),Fld(2),Fld(3),Fld(4),Fld(5)))
Next
'
TableDefectos.SetColumnsWidths(Array As Int(60dip,350dip,60dip,60dip,60dip,60dip))
Cursor1.Close '
Any cluees?