G
Guest
I am receiving unexpected results when performing a select method on a
datatable. What I am noticing is that occasionally only the first part of the
search criteria is being used. Example of the code:
Dim oRows() As DataRow
Dim oRow As DataRow
oRows = Sales.Select("thsmn = " & strSalesman & " AND thindt >= " &
strStart & " AND thindt <= " & strEnd & " AND thcmp = " &
Integer.Parse(strCompany))
For Each oRow In oRows
'4-19-05
'GetSales += oRow(2)
GetSales += oRow(2) + oRow(4)
Next
Result of the search criteria: “thsmn = 1 and thindt >= 20050924 and thindt
<= 20050928 and thcmp = 1â€
thsmn being the salesman number
thindt being the invoice date stored as a decimal - example 9-30-2005 is
20050930
thcmp being the company number
Does anyone know why it might be ignoring the search criteria after the
salesman number?
datatable. What I am noticing is that occasionally only the first part of the
search criteria is being used. Example of the code:
Dim oRows() As DataRow
Dim oRow As DataRow
oRows = Sales.Select("thsmn = " & strSalesman & " AND thindt >= " &
strStart & " AND thindt <= " & strEnd & " AND thcmp = " &
Integer.Parse(strCompany))
For Each oRow In oRows
'4-19-05
'GetSales += oRow(2)
GetSales += oRow(2) + oRow(4)
Next
Result of the search criteria: “thsmn = 1 and thindt >= 20050924 and thindt
<= 20050928 and thcmp = 1â€
thsmn being the salesman number
thindt being the invoice date stored as a decimal - example 9-30-2005 is
20050930
thcmp being the company number
Does anyone know why it might be ignoring the search criteria after the
salesman number?