Android Question Insert Into SQLite

I am nearly finished porting the "Design" routines from VB.Net (mobile) to B4A. The Design consists of geometric parameters...i.e. Horizontal Alignment, Vertical Alignment, Crossfalls, Surface Widths, Stakeline Offsets, etc. These are parameters used to define a road, a canal, railway, etc.
As an example, I have a Table called "Crossfalls", consisting of 3 variables:
Stakevalue, Left Crossfall, Right Crossfall
0, -2,-2
1000, -4, -4
2000, -3, -3

Stakevalue is the distance along the Horizontal Alignment from the start of the Project and Crossfalls are the slope of the road surface. A road surface always has a slope or Chamber to get rid of rain water or to apply super-elevations.

What is the easiest way to insert a new value between 0 & 1000....i.e. 500, -2.5, -2.5

Then the Table will be as such:
0, -2, -2
500, -2.5, -2.5
1000, -4, -4
2000, -3, -3

In, I copied the entire Table to temporary variables, inserted the new values, cleared the Table and then copied the variables back to the Table.

Surely there must be an easier way?


Licensed User
Longtime User
Follow the SQL Tutorial
Upvote 0


Licensed User
Does SQLite not return you the four rows ordered by whatever field(s) you like?

It's probably mentioned in the online help, but if you're still getting to grips with SQL then try page 14 of the Klaus' booklet:


contained in the file:

from GitHub project:

Upvote 0