Sqlite Data Sequence

Discussion in 'Questions (Windows Mobile)' started by ceaser, Jul 28, 2008.

  1. ceaser

    ceaser Active Member Licensed User


    In a construction project (road, pipeline, railway, etc) you have what we call a horizontal alignment which defines the path that the project follows. Each point (node) where the direction of this path changes is defined by coordinates (Y & X). The coordinates defining this route (path) follow a fixed sequence.

    Now, my problem is that if I amend one of these nodes (changing the coordinates), Sqlite puts the amended node at the end of the file, which I don't want.

    If it is say node number 3 out of a total of 10 nodes, that I change, then it must say at position number 3 in the file and not add it at the end of the file.


  2. BjornF

    BjornF Active Member Licensed User

    Dear Ceaser,

    Couldn't you open the file sorted on the position? in which case the physical position in the file does not matter.

    all the best / Björn
  3. Erel

    Erel Administrator Staff Member Licensed User

    As BjornF wrote you should not assume that the raw data is saved in a specific order.
    Instead use Order By to specify the required order:
    "SELECT * FROM table1 WHERE ... ORDER BY SomeCol"
  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