Change rows position in a table

Discussion in 'Questions (Windows Mobile)' started by francisco cobos, Oct 27, 2008.

  1. francisco cobos

    francisco cobos Member Licensed User

    Is there any way for change the rows position when I load a .csv table?
     
  2. JOTHA

    JOTHA Well-Known Member Licensed User

    Hi Francisco,

    Try this:
    Code:
    Sub ShowRow
        Title.Text = TableName.Cell(
    "Title","")   
        Lastname.Text = TableName.Cell(
    "Lastname","")
        Firstname.Text = TableName.Cell(
    "Firstname","")
    End Sub
    Now change:
    Code:
    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 ...
     
  3. francisco cobos

    francisco cobos Member Licensed 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
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    The only way to change a table's columns is to manually copy each cell.
    You can convert your database to an SQL db and then you will be able to get the results in any required order.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice