I have tried this code to find record using FindBy. I have a record which is 11-302 but nothing when I used this code.
DataSet11.Customer.FindByCustNo("11-302")
CustNo is the Primary key!
Kindly correct this code for me?
Printable View
I have tried this code to find record using FindBy. I have a record which is 11-302 but nothing when I used this code.
DataSet11.Customer.FindByCustNo("11-302")
CustNo is the Primary key!
Kindly correct this code for me?
So r is still nothing after you do something like this?
I tried this on the Northwind Employee table with a typed dataset, and for me it works.....Code:Dim r As DataSet11.CustomerRow
r = DataSet11.Customer.FindByCustNo("11-302")
The messagebox in this example gives me "Janet" as it should.Code:Dim r As DataSet1.EmployeesRow
r = DataSet11.Employees.FindByEmployeeID(3)
MsgBox(r(2))
As soon as I try to find something thats not in the datatable I get an error of course.
Are you maybe using Char as datatype in a SQL server so that the "11-302" is actually "11-302 " (filled with spaces) or something?