I am using the following code to get the "setpoint" record from the "Zones" table of a Database.
I need to filter this on 2 fields: "ToolName" and "Zone"
The app compiles, but I get a syntax error when running the app.
I need to filter this on 2 fields: "ToolName" and "Zone"
The app compiles, but I get a syntax error when running the app.
B4X:
Dim MyTool As String
Dim MyZoneNum As String
Dim MySetPoint As String
MyTool = lblSetupTool.Text
MyZoneNum = MyZone.Substring(6)
Dim Curs As Cursor
Curs = SQL.ExecQuery2("SELECT setpoint FROM Zones WHERE ToolName = " & MyTool & " AND WHERE Zone = " & MyZoneNum & "", Array As String(Value))
Dim i As Int
For i = 0 To Curs.RowCount - 1
Curs.Position = i
MySetPoint = Curs.GetString("SetPoint")
Next
Curs.Close