Sub InicializarBD
' TABLA CONFIGURACION
sql.ExecNonQuery("CREATE TABLE configuracion (id INTEGER PRIMARY KEY AUTOINCREMENT, variable TEXT, valor TEXT)")
sql.ExecNonQuery2("INSERT INTO configuracion (variable, valor) VALUES(?,?);", Array As Object("version_bd", 1))
sql.ExecNonQuery2("INSERT INTO configuracion (variable, valor) VALUES(?,?);", Array As Object("version_app", 2))
sql.ExecNonQuery2("INSERT INTO configuracion (variable, valor) VALUES(?,?);", Array As Object("usuario", 0))
sql.ExecNonQuery2("INSERT INTO configuracion (variable, valor) VALUES(?,?);", Array As Object("contrasena", 0))
sql.ExecNonQuery2("INSERT INTO configuracion (variable, valor) VALUES(?,?);", Array As Object("precio_km", 0.32))
Log("DB Files: " & sql.ExecQuerySingleResult("SELECT count(name) FROM sqlite_master WHERE type='table' AND name='configuracion' COLLATE NOCASE"))
Log("Rows: " & sql.ExecQuerySingleResult("SELECT count(*) FROM configuracion"))
End Sub