FindBy<> method in Typed DataSet.

Discussion in 'ASP .Net' started by Henry, Dec 19, 2003.

  1. Henry

    Henry Guest

    Dear Group:

    A question regarding the behavior of the Visual Studio.NET.

    When I drag the "Customers" table in "Northwind" database on Server Explorer
    to my web page, then select the DataAdapter object, and then right-click to
    "Generate DataSet.." The C# class source file for this typed DataSet would
    have the following method

    public CustomersRow FindByCustomerID(string CustomerID) {
    return ((CustomersRow)(this.Rows.Find(new object[] {
    CustomerID})));
    }

    in the CustomerDataTable class. It's quite convenient to use that to do key
    value search.

    But if I have an XML file, and use XML Schema Designer to create the schema
    for that XML file, select the primary key on the schema, and save the files,
    the generated C# class source file would *not* have that "FindBy<key name>"
    method in it.

    Can someone advice how does VS.NET determines when to create that "FindBy"
    method based on the schema attributes?

    TIA.

    from Henry
    Henry, Dec 19, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nedu N
    Replies:
    1
    Views:
    1,774
    Chris Taylor
    Oct 31, 2003
  2. Nedu N
    Replies:
    2
    Views:
    2,140
  3. Keith
    Replies:
    1
    Views:
    458
    Keith
    Feb 8, 2004
  4. Greg McAllister

    Using the FindBy method

    Greg McAllister, Jun 9, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    648
    Greg McAllister
    Jun 9, 2005
  5. Kiran

    ### FindBy in Typed Dataset ###

    Kiran, Jul 14, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    538
    Robert Smith
    Jul 16, 2005
Loading...

Share This Page