You should distinguish between the B4A syntax and the SQLite syntax.
In B4A you need double quotes to define a String like :
If you want to append the variable i you must write it like this:
If you want to append a calculation you must write it like this:
In SQLite you need single quotes for TEXT field contents like:
query = "SELECT Value FROM Settings WHERE Key = 'db1'"
This line means that the Key content is a number:
query = "SELECT Value FROM Settings WHERE Key = 1"
And in your case with the calculation:
query = "SELECT Value FROM Settings WHERE Key = 'db" & (i + 1) & "'"
In your code you expect only a single answer so you could use this code:
For i = 0 to dbCount - 1
dbName(i) = SQL1.ExecQuerySingleResult("SELECT Value FROM Settings WHERE Key = 'db" & (i + 1) & "'"
Next
or like this, changing the limits of i :
For i = 1 to dbCount
dbName(i - 1) = SQL1.ExecQuerySingleResult("SELECT Value FROM Settings WHERE Key = 'db" & i & "'"
Next
Best regards.