G
Guest
I have a simple App set up for testing. I read in a CSV file into a
DataTable. Then I cycle thru integers from 100,000 to 99,999,999 and use the
following to see if that number exists in my DataTable:
For counter = 100000 To 99999999
Dim found_CSV_User() As DataRow
Dim CSV_User As DataRow
Console.Write(counter)
found_CSV_User = CSV_Users_Table.Select("EmployeeID = " & counter)
For Each CSV_User In found_CSV_User
Console.Write(" -- " & CSV_User("mobile"))
Next
Console.Write(vbCrLf)
Next
Numbers 100,000 thru 107,102 work as expected and give me the Mobile number
in the DataTable. When the counter hits
107,103, I get a System.Data.EvaluateException stating "Cannot perform '='
operation on System.String and System.Int32." on the CSV_Users_Table.Select
line.
BTW, I am using VB.NET, VS2005. It works fine in VS2003. I'm trying to
upgrade
my app.
What is so special about 107,103 and how can I get around it?
Thanks All!!
DataTable. Then I cycle thru integers from 100,000 to 99,999,999 and use the
following to see if that number exists in my DataTable:
For counter = 100000 To 99999999
Dim found_CSV_User() As DataRow
Dim CSV_User As DataRow
Console.Write(counter)
found_CSV_User = CSV_Users_Table.Select("EmployeeID = " & counter)
For Each CSV_User In found_CSV_User
Console.Write(" -- " & CSV_User("mobile"))
Next
Console.Write(vbCrLf)
Next
Numbers 100,000 thru 107,102 work as expected and give me the Mobile number
in the DataTable. When the counter hits
107,103, I get a System.Data.EvaluateException stating "Cannot perform '='
operation on System.String and System.Int32." on the CSV_Users_Table.Select
line.
BTW, I am using VB.NET, VS2005. It works fine in VS2003. I'm trying to
upgrade
my app.
What is so special about 107,103 and how can I get around it?
Thanks All!!