Sub Verif_Update_Scala
'(for when and if law will change params of this static table)
Dim VersioneEsistente As Int
'verif wich scala is in the DB:
Dim Cursor As Cursor
Dim NumRows As Int
Cursor = SQL1.ExecQuery("SELECT * FROM scala")
NumRows=Cursor.RowCount
If NumRows > 0 Then
Cursor.Position = 5 '(one of the 40 rec)
VersioneEsistente=Cursor.GetInt("versione")
'Log(VersioneEsistente)
End If
Cursor.Close
If VersioneEsistente < 2014 Then 'or what it will be
'update(La 1.ma versione è la 2012):
Dim ver As Int : ver = 2015
Dim Nuova_2534 As Int : Nuova_2534 = 426
Dim i As Int
For i = 0 To NumRows-1
SQL1.ExecNonQuery("UPDATE scala SET versione="& ver &",perc="& Nuova_2534 )
Next
'Log("DB updated")
End If
'Log("DB doesn't need to be updated")
End Sub