Hello forum community,
I would like to generate
a row of numbers and store them into SQLite
in each line.
Does anyone know why this is NOT going with this code:
In the log file the count are displayed , but in SQLite only the " last " IDNR is stored the same in all the rows .
Can anybody give advice?
I would like to generate
a row of numbers and store them into SQLite
in each line.
Does anyone know why this is NOT going with this code:
B4X:
Cursor = SQL1.ExecQuery("SELECT Feld_006 FROM Abrechnung")
For i = 0 To Cursor.RowCount -1
Cursor.Position = i
Dim Abrechnung_IDNR As String
Abrechnung_IDNR = i +1 '-- Position of Cursor +1 --
'-- Save to SQLite --
SQL1.ExecNonQuery("UPDATE Abrechnung SET Feld_006 = '"&Abrechnung_IDNR&"' ") 'WHERE Feld_006 = '"&Cursor.Position&"' +1 ")
Log("-- 3196 -- Abrechnung-IDNR: "&Abrechnung_IDNR&"")
Next
Cursor.Close
In the log file the count are displayed , but in SQLite only the " last " IDNR is stored the same in all the rows .
Can anybody give advice?