Unexpected results from datatable select method

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
Looks like you are hitting into v1.1 SP1 DataTable.Select bug. The fix for
it has been
release as a hotfix. Please refer to the KB article mentioned below for more
information on the bug and the associated hotfix.
http://support.microsoft.com/?id=900468.


Thanks,
Kawarjit Bedi [MSFT]
(e-mail address removed)

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top