dyarosh
asked on
Error when doing a Query Search on my Dataset in VB.Net
I have a VB.Net Windows Application that uses a MS Access Database. One of the functions of the application reads from an Excel file that contains employee info of which one of the fields is the SSN. It uses the SSN to see if the employee exists in the MS Access database using the following code (ec.SSN is declared as a String):
queryStr = "SSN=" & ec.SSN
EmployeeRowArray = Me.HwDataSet.Employee.Sele ct(querySt r)
If EmployeeRowArray.Count > 0 Then
Everything works fine until I get to a row in the Excel file whose SSN is 451xxxx10. I get the error shown in the attached file when I execute EmployeeRowArray = Me.HwDataSet.Employee.Sele ct(querySt r) and I can't figure out why. Initially I thought it had something to do with a limit and the SSN was greater than that limit but the file has other SSNs that are greater than 451xxxx10 and it works fine. If I remove the row that has 451xxxx10 as it's SSN, the function works fine. This leads me to believe that it is a data problem but I can't figure out what is different about this particular row. Any help would be greatly appreciated.
queryStr = "SSN=" & ec.SSN
EmployeeRowArray = Me.HwDataSet.Employee.Sele
If EmployeeRowArray.Count > 0 Then
Everything works fine until I get to a row in the Excel file whose SSN is 451xxxx10. I get the error shown in the attached file when I execute EmployeeRowArray = Me.HwDataSet.Employee.Sele
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER