Hi .. Starting to tear my hair.. I have tried every concoction I can thow at this and have given up , There was another similar post where Klaus supplied the right query syntax that should have solve my problem, but did not.
I am trying to get the value of a key that matches a string combined with the adjusted value of the loop counter.
Or would it be just as easy to concoct a string prior the the query and just insert the variable instead.
I do need the loop as dbCount will increase in the future
'Recorded keys .. db1 db2
'dbCount = 2
Many Thanks Cheers mj
I am trying to get the value of a key that matches a string combined with the adjusted value of the loop counter.
Or would it be just as easy to concoct a string prior the the query and just insert the variable instead.
I do need the loop as dbCount will increase in the future
'Recorded keys .. db1 db2
'dbCount = 2
B4X:
Dim dbName(dbcount) As String
For i = 0 To dbCount - 1 'Trying to achieve WHERE Key = ' db & ( i+1) '
Cursor1 = SQL1.ExecNonQuery("SELECT Value FROM Settings WHERE Key = 'db' & '"& (i+1) &"' ")
'Cursor1 = SQL1.ExecNonQuery2("SELECT Value FROM Settings WHERE Key= ?, 'db' & '"& (i + 1) &"' ")
Cursor1.Position = 0
dbName(i) = Cursor1.GetString("Value")
Next
Many Thanks Cheers mj