Unexpected results from datatable select method

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?
 
K

Kawarjit Bedi [MSFT]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top