Results 1 to 2 of 2

Thread: Find By

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Pilipinas
    Posts
    441

    Find By

    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?

  2. #2
    Registered User
    Join Date
    Nov 2002
    Location
    Växjö, Sweden
    Posts
    314
    So r is still nothing after you do something like this?

    Code:
    Dim r As DataSet11.CustomerRow
    r = DataSet11.Customer.FindByCustNo("11-302")
    I tried this on the Northwind Employee table with a typed dataset, and for me it works.....

    Code:
    Dim r As DataSet1.EmployeesRow
    r = DataSet11.Employees.FindByEmployeeID(3)
    MsgBox(r(2))
    The messagebox in this example gives me "Janet" as it should.

    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width