Evening People,
Thanks (again) for taking a moment to look at a slight problem for me.
This query works :-
When the user presses the ImageView, ResultTest (on the Results Module) is set to 45, testtxt (on the Results Module) is set to "SELECT NAME FROM Rec WHERE CT = "& Results.ResultTest & curname & " ORDER BY NAME"
This works fine, in my 'Results' Module I have the following :-
Great, so as you can see, this will populate a listview with all entries where the column CT has the value of 45
Now..why doesn't this work?
Now, from what I can see, we should be getting SELECT NAME FROM Rec WHERE VE = V
But we're not, according to the errors, we're getting SELECT NAME FROM Rec WHERE VE = "ORDER BY NAME"
It's as if Results.ResultTest isn't being 'set' correctly (or at all)
It's set as a Process_Global on both modules (and for the first example it works just fine). V is also declared as a string < I'm guessing this is where the problem is. On the working example, we're just searching on numerical values, but on this we're searching for a letter.
Process Globals looks a little like this (on both modules)
Dim ResultTest="" As String
Dim V As String
Is this the issue?
Thanks (again) for taking a moment to look at a slight problem for me.
This query works :-
B4X:
Sub U45IV_Click
Results.ResultTest = 45
Results.testtxt = "SELECT NAME FROM Rec WHERE CT = " & Results.ResultTest & curname & " ORDER BY NAME "
StartActivity("Results")
End Sub
This works fine, in my 'Results' Module I have the following :-
B4X:
cur = SQL1.ExecQuery(testtxt)
For i = 0 To cur.RowCount -1
cur.Position = i
CTLV.AddSingleLine(cur.GetString("NAME"))
Now..why doesn't this work?
B4X:
Sub VEIV_Click
Results.ResultTest= V
Results.testtxt = "SELECT NAME FROM Rec WHERE VE = " & Results.ResultTest & curname & " ORDER BY NAME "
StartActivity("Results")
End Sub
But we're not, according to the errors, we're getting SELECT NAME FROM Rec WHERE VE = "ORDER BY NAME"
It's as if Results.ResultTest isn't being 'set' correctly (or at all)
It's set as a Process_Global on both modules (and for the first example it works just fine). V is also declared as a string < I'm guessing this is where the problem is. On the working example, we're just searching on numerical values, but on this we're searching for a letter.
Process Globals looks a little like this (on both modules)
Dim ResultTest="" As String
Dim V As String
Is this the issue?