in the following code, I intend to filter data in my table as per P1 and ACType, for which it goes through each item of a spinner-spnAC. But, I am getting an out of bound exception. Where am I going wrong? thnx..
B4X:
Dim gal() As String
For j= 0 To spnAC.Size -1
gal(j) = spnAC.GetItem(j)
Dim MyQuery As String
MyQuery="SELECT SUM(dayhr) ||':'|| SUM(daymin) ||':'|| SUM(nitehr) ||':'|| SUM(nitemin) ||':'|| SUM(instrhr) ||':'|| SUM(instrmin) FROM " & _
Main.DBTableName &" where capacity = 'P1' and ACType =' "& gal(j) &"' "
NEXT
Last edited: