Change rows position in a table

JOTHA

Well-Known Member
Licensed User
Longtime User
Hi Francisco,

Is there any way for change the rows position when I load a .csv table?
Try this:
B4X:
Sub ShowRow
    Title.Text = TableName.Cell("Title","")   
    Lastname.Text = TableName.Cell("Lastname","")
    Firstname.Text = TableName.Cell("Firstname","")
End Sub
Now change:
B4X:
Sub ShowRow
    Title.Text = TableName.Cell("Title","")
    Firstname.Text = TableName.Cell("Firstname","")   
    Lastname.Text = TableName.Cell("Lastname","")
End Sub
I hope this could help you ...
 

francisco cobos

Member
Licensed User
Longtime User
Thanks Jotha for your answer, I'm afraid I have made a mistake with the English word: what I need is something that change the position of the COLUMNS, not the rows whith all the data in this column.
I have tried this, but it's very slow if the data base is large:

table1.LoadCSV("test.CSV", ";",false,true)
For i=0 To table1.RowCount-1
a=table1.cell("column1",i)
b=table1.cell("column2",i)
table1.cell("column1",i)=b
table1.cell("column2",i)=a
Next i

Cheers.
Francisco Cobos
 
Top