DataTable already exist. Need to add data to DataTable

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • C#Schroeder

    DataTable already exist. Need to add data to DataTable

    I am trying to add an email and 2 phone numbers to a DataTable that
    has already been populated in my window application. How do I call
    the DataSet with the information in it and update the users row in the
    Personal(DataTa ble)?

    Thanks
    Tony

  • sloan

    #2
    Re: DataTable already exist. Need to add data to DataTable


    Use

    DataSet.MyTable Name.Select ( filter ) to find the row(s) you're interested
    in.

    DataSet.Employe e.Select ("EmpID=123" )

    is an example.




    "C#Schroede r" <Anthony.Schroe der@gray-research.comwro te in message
    news:1174930163 .001365.50000@y 80g2000hsf.goog legroups.com...
    I am trying to add an email and 2 phone numbers to a DataTable that
    has already been populated in my window application. How do I call
    the DataSet with the information in it and update the users row in the
    Personal(DataTa ble)?
    >
    Thanks
    Tony
    >

    Comment

    • Ignacio Machin \( .NET/ C# MVP \)

      #3
      Re: DataTable already exist. Need to add data to DataTable

      Hi,

      Frankly I Do not understand your question, if you have a DataTable you add
      data to it like:

      DataRow row = your_DataSet.Ta bles["TableNAme"].NewRow();
      row["Column1"] = "your value";

      Post back if this is not what you asked

      "C#Schroede r" <Anthony.Schroe der@gray-research.comwro te in message
      news:1174930163 .001365.50000@y 80g2000hsf.goog legroups.com...
      >I am trying to add an email and 2 phone numbers to a DataTable that
      has already been populated in my window application. How do I call
      the DataSet with the information in it and update the users row in the
      Personal(DataTa ble)?
      >
      Thanks
      Tony
      >

      Comment

      • C#Schroeder

        #4
        Re: DataTable already exist. Need to add data to DataTable

        On Mar 26, 12:53 pm, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
        laceupsolutions .comwrote:
        Ok I have a windows application that has multiple forms. On the first
        form I populate the PersonalInforma tion DataTable with First Name,
        Last Name, Address, City, State, and Zipcode. The user then presses
        the next button and can enter Email Address and a Phone Number for the
        user. I want this information to be placed in the PersonalInforma tion
        DataTable. I am trying to figure out how to call the
        PersonalInforma tion DataTable with all the information that was
        entered on the first screen and update it with the Email and Phone
        Numbers for the person.

        Right now I can save the first part of this with the First Name, Last
        Name, etc. I just don't know how to call the DataTable back up so I
        can place the Email Address and Phone Numbers in it.

        I hope this will help you to better understand my problem

        Hi,
        >
        Frankly I Do not understand your question, if you have a DataTable you add
        data to it like:
        >
        DataRow row = your_DataSet.Ta bles["TableNAme"].NewRow();
        row["Column1"] = "your value";
        >
        Post back if this is not what you asked
        >
        "C#Schroede r" <Anthony.Schroe ...@gray-research.comwro te in message
        >
        news:1174930163 .001365.50000@y 80g2000hsf.goog legroups.com...
        >
        >
        >
        I am trying to add an email and 2 phone numbers to a DataTable that
        has already been populated in my window application. How do I call
        the DataSet with the information in it and update the users row in the
        Personal(DataTa ble)?
        >
        Thanks
        Tony- Hide quoted text -
        >
        - Show quoted text -

        Comment

        Working...